P
Home Articles Poems, Wishes Recipes Quotes Songs Jokes Companies
Home Articles Poems, Wishes Recipes Quotes Songs Jokes Companies

How to Install and Configure AnyDesk on Ubuntu 22.04 via SSH

Rate this article Choose 1-5 stars.

If you have only SSH access to your Ubuntu 22.04 server, you can still install and configure AnyDesk for remote desktop access. Below are step-by-step instructions to complete the setup.


Step 1: Update the System

First, update the package list to ensure all dependencies are up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Add AnyDesk Repository and GPG Key

Since AnyDesk is not included in the default Ubuntu repositories, we need to add its official repository.

1. Import the GPG Key

wget -qO - https://keys.anydesk.com/repos/DEB-GPG-KEY | sudo apt-key add -

2. Add the AnyDesk Repository

echo "deb http://deb.anydesk.com/ all main" | sudo tee /etc/apt/sources.list.d/anydesk.list

3. Update Package Lists

sudo apt update

Step 3: Install AnyDesk

Now, install AnyDesk using the following command:

sudo apt install anydesk -y

Step 4: Start and Enable AnyDesk Service

Once installed, start the AnyDesk service:

sudo systemctl start anydesk

Enable it to start automatically on system boot:

sudo systemctl enable anydesk

Check if the AnyDesk service is running:

sudo systemctl status anydesk

You should see output similar to:

● anydesk.service - AnyDesk service
Loaded: loaded (/etc/systemd/system/anydesk.service; enabled; vendor preset: enabled) Active: active (running) since ...

Step 5: Get AnyDesk Address

Since you are using SSH and don’t have a GUI, retrieve the AnyDesk ID manually by running:

anydesk --get-id

This will return a 9-digit ID (e.g., 123 456 789), which you will use to connect remotely.

If you need the current status of AnyDesk, run:

anydesk --get-status

Step 6: Configure Unattended Access (Optional)

If you want to access the server without needing to accept the connection manually, set up a password:

  1. Create the security config file:
sudo mkdir -p /etc/anydesk
echo "your_secure_password" | sudo tee /etc/anydesk/service.conf
  1. Set proper permissions:
sudo chmod 600 /etc/anydesk/service.conf
  1. Restart AnyDesk to apply changes:
sudo systemctl restart anydesk

Now you can connect to the Ubuntu server remotely using AnyDesk ID + password.


Step 7: Allow AnyDesk Through Firewall (If Enabled)

If UFW (Uncomplicated Firewall) is active, allow AnyDesk traffic:

sudo ufw allow 7070/tcp
sudo ufw reload

Verify firewall rules:

sudo ufw status

Step 8: Connect to Your Ubuntu Server Remotely

From another device (Windows, Mac, Linux, or Android):

  1. Install AnyDesk from anydesk.com/download.
  2. Open AnyDesk and enter your Ubuntu AnyDesk ID (from Step 5).
  3. Click "Connect" and enter the password (if unattended access is enabled).

Remove AnyDesk (If Needed)

If you need to uninstall AnyDesk later:

sudo apt remove --purge anydesk -y
sudo rm -rf /etc/apt/sources.list.d/anydesk.list sudo systemctl stop anydesk sudo systemctl disable anydesk

You might be interested to read these articles:

Optimizing Scrum Resource Tracking Systems for Agile Success

Scrum Cloud Cost Management: Efficient Strategies for Optimization

A Comprehensive Guide to Software Project Management and CI/CD Pipelines

Understanding Scrum Vulnerability Scanners: Best Practices and Insights

Kanban Security Event Monitoring: A Comprehensive Guide

Essential Network Security: Mastering Firewall Configuration Tools

Exploring iOS API Gateways: Optimizing Mobile Application Integration

Agile Resource Tracking Systems: Enhancing Efficiency and Flexibility

Mastering Kanban Orchestration Systems: Strategies for Enhanced Workflow Organization

Enhancing Cyber Defense with Network Security Incident Response Platforms

Exploring ITIL Test Management Systems: Best Practices and Insights

Best Cloud Security Software and Solutions for Mid-Size and Enterprise Companies

Buying Guide: Samsung Galaxy A26, A36, A56 Comparison: Specs, Features, Best Cameras, Battery life and Key Differences

Revolutionizing App Development with iOS Serverless Architectures

Kanban Monitoring Dashboards: Essential Tools for Workflow Optimization

Linux Automation Tools: Streamline Your Workflow with Efficiency

Protect Your Data with TestOps Data Loss Prevention Systems

Kanban CI/CD Pipelines: Enhancing Your DevOps Workflow

Exploring Linux Virtualization Tools: Your Guide to Optimal Solutions

Enhance Your Scrum Workflow with Automation Tools

Google Photos Best Alternatives - Immich vs Nextcloud: Which One Should You Choose?

Efficient Mobile Device Management with Scrum

Enhancing Software Development with TestOps Logging Systems

Understanding ITIL API Gateways: Best Practices and Benefits

Resource Planning API Gateways: Streamlining Integration Efforts