I am trying to login into remote server without password using ssh but I am get the error:
Permission denied (publickey)
To copy .pub key to the server, I had:
PasswordAuthentication = yes (in the sshd_config file).
After I copied the .pub key, the i disabled the password in the ssh_config I had:
PasswordAuthentication = no
Now when I tried to ssh:
ssh 'server@192.168.xx.x'
I was getting the error:
Permission denied (publickey)
How can I solve the problem?
I have changed the authorized_keys permission, the .ssh/ permission and so on, but the problem persist. I have even used the ssh-agent $SHELL && ssh-add command.
.ssh
directory and the files therein on theserver
system?authorized_keys
in remote host must be 644ssh -vvv
will give more verbose output - but is the .pub key in the your authorized_keys file on the server you want to access?ssh-add
.