Skip to content

Instantly share code, notes, and snippets.

@imami
Last active May 8, 2024 00:52
Show Gist options
  • Save imami/4e8b187e7e1e6fc9510d907eb1a7a5b3 to your computer and use it in GitHub Desktop.
Save imami/4e8b187e7e1e6fc9510d907eb1a7a5b3 to your computer and use it in GitHub Desktop.
AnyDesk - How Enable Remote Access from ubuntu/debian terminal

###AnyDesk - How Enable Remote Access from ubuntu/debian terminal.

Note:

Here are the commands might be usefull in this purpose:

  • anydesk --get-status : To get current status of anydesk, which might be offlien,online or nothing.
  • anydesk --get-id : To get the ID that your system can be accessed by.
  • anydesk --service : To start anydesk service if not already running (for Linux).
  • anydesk --restart-service : To restart anydesk service
  • anydesk --stop-service : To stop anydesk service
  • sudo echo qazwsxedc | anydesk --set-password : to set password on anydesk (required to access from a remote system).

In case that your target machine is a kind of a Ubuntu or a Debian based one:

  1. echo -e "ad.security.allow_logon_token=true\nad.features.unattended=true" >> ~/.anydesk/user.conf
  2. sudo echo [your-custom-password] | anydesk --set-password
  3. sudo sed -i '' -e 's/# AutomaticLogin/AutomaticLogin/g' -e 's/#WaylandEnable/WaylandEnable/g' /etc/gdm3/custom.conf
  4. sudo reboot
  5. Drink your coffee, and wait until your system becomes up and accessible via ssh or terminal.
  6. Run anydesk --get-status , if its not online then run anydesk --service.
  7. Run anydesk --get-id && echo to get your desk id.
  8. Use your desk id in your Anydesk client, to access the remote system.

Github: github.com/imami , Twitter: @e_imami

@JonahTzuChi
Copy link

@JonahTzuChi, thank you for your help, but my problem solving the black screen issue is that I'm trying to set up AnyDesk in Ubuntu 14.04 LTS, and this version of Ubuntu doesn't use gdm3, so I can't use those settings you provided. I can guarantee you that I tried everything I found online but to no avail. Either way, many people will find your settings useful.

I believe you do! I feel like talking through a time tunnel 14.04LTS!!!

@rahulteja526
Copy link

sudo echo [my-password] | sudo anydesk --set-password

If you set a weak password, the command will not work. Suggested Password Eg: GitHub@2023

Reference: https://unix.stackexchange.com/questions/552742/how-to-enable-unattended-access-in-anydesk-debian-10-openbox-lightdm

This worked for me on Ubuntu 20

@fioranosoftwareadmin
Copy link

I am facing the issue with mint, can some give me the steps to clear this anydesk issue on mint

@fioranosoftwareadmin
Copy link

I have tried this in both ubuntu and mint, its not working still i see the same issue "please do not start anydesk as root user this might lead to unexpected behavior"

  1. we have a requirement where we need to login as root user and need to run the anydesk application
  2. In both ubuntu and Mint after logging as root in gui, the anydesk throws the same error
    Kindly provide some inputs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment