SSH passwordless login - debug2: we did not send a packet, disable method
- generate a public and a private key pair
ssh-keygen -f keysfile
- upload the public key to the server in your home folders "~/.ssh" directory (create it if it's not there)
keysfile.pub to remotehost/~/.ssh folder
- dump that key to the accepted keys (in the same .ssh folder)
cat keysfile.pub > authorized_keys
- login to the server using the private key from your client
ssh -i keysfile [email protected]
ssh -i keysfile [email protected] -vv
If you see the following error message:
debug2: we did not send a packet, disable methodit's most probably because the server cannot access the authorized_keys file. Some howtos just add your keyfile's name to authorized_keys but that failed for me all the time. Dumping the public key to the file solved this problem.
thanks! this help me to solve my problem...ReplyDelete
$ sudo chmod 700 ~/.ssh
$ sudo chmod 600 ~/.ssh/*
Thanks! This solves my problem.Delete
setting permissions helped me:ReplyDelete
sudo chown -R `whoami` ~
check your sever log file.ReplyDelete
one problem occurred to me is my home directory has write permission for the group.
Removing that will solve the problem.
Thankfully this kind of information gets stored online and findable by search engines ;-)Delete
Thanks for sharing (obviously your tips really helped me)!
This comment has been removed by the author.ReplyDelete