Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

Permission denied when using SSH to connect to a remote server

Writer Matthew Martinez

I am new to ssh and have it installed in two Linux machines (Ubuntu 20.04.3 and Zorin OS 16). I tried to access from one machine to the other via ssh. The command I use is ssh username@ip-address, but I got an error saying Permission denied despite entering the correct password. I have tried the following ways, but none of them is working.

  1. Change root password and enable PermitRootLogin in /etc/ssh/sshd_config.
  2. Enable PasswordAuthentification
  3. Reinstall ssh
2

1 Answer

The "username" in ssh username@ip-address is actually "root" in this case, since it seems you're trying to login as root, so that makes the command: ssh root@ip-address.

Also, on the remote server, make sure sshd is running. If using systemd, you can run systemctl status ssh or systemctl status sshd (sudo shouldn't be necessary for 'status') depending on distro.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy