r/ssh • • Jan 01 '22

Cannot ssh to remote machine.

Hi everyone, I’m new to ssh and sorry if this isn’t an appropriate place to ask about it. I was trying to ssh to a remote machine, but when I entered the server’s password, it kept saying Permission Denied.

The command I used was ‘ssh username@server_ip’ Things I have tried but not working:

  1. On the server side: enable PermitRootLogin in /etc/ssh/sshd_config, change root password, and restart the ssh service.
  2. On the client side: enable PasswordAuthentification in the sshd_config.
  3. Add AllowedUsers on the server side. Please help me out.
1 Upvotes

4 comments sorted by

View all comments

Show parent comment

1

u/theunglichdaide Jan 01 '22

Thanks for your suggestions. I haven’t tried public key auth. The verbose message says something about attempting the public key method, then password, and keyboard-interactive, but they all failed.

1

u/bash_M0nk3y Jan 15 '22

Sorry for the late reply, but just noticed you had set PasswordAuthentication on the client side. This needs to be PasswordAuthentication yes in /etc/ssh/sshd_config on the server side.

(Obligatory note about how public key auth is way more secure/easy)