Logging in via SSH without a password

On Server Side:

- in sshd_config:
RSAAuthentication yes
PubkeyAuthentication yes
- restart server:
- if there is no ~/.ssh file create it:
mkdir ~/.ssh
- change permissions:
chmod 700 ~/.ssh

On Client Side:

- generate key (don't enter password when prompted)
ssh-keygen -t rsa
		
- copy the key over to the server

ssh-copy-id -i ~/.ssh/id_rsa.pub "<username>@<remote_host> -p<port>"

  



Posted by JB Uy on June 24, 2013 at 01:16 PM UTC
Edited on December 13, 2013 at 08:49 PM UTC
1 Notes

Alternatively, if ssh-copy-id doesn't work:

  1. Copy the id_rsa.pub file or copy the contents, and append it to the 'authorized_keys' on the server

http://csua.berkeley.edu/~ranga/notes/ssh_nopass.html

Posted by JB Uy on December 24, 2013 at 09:39 PM UTC
Edited on December 24, 2013 at 09:39 PM UTC
via hutility.notedock.com | Link
Public Comments
comments powered by Disqus