I have configured my droplet using the following guide -https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-22-04
I then followed this guide to add a GUI - https://www.digitalocean.com/community/questions/how-to-install-graphical-interface
All the steps worked, until the step to establish a secure connection (Step 3 — Connecting to the VNC Desktop Securely).
I ran the code that was provided (changing the user parameter accordingly) -
> ssh -L 59000:localhost:5901 -C -N -l sammy your_server_ip
But I got the following error - Permission denied (publickey).
I do have SSH keys as the authentication method on root, and my non root user can login successfully. So I assume the key was copied successfully to that user.
I was required to set a password for the non root user, and I am not sure if that could be the cause of the error.
How can I fix this error and establish the SSH tunnel?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.