I know this is a no brainer for most people, but it took me sometime to do it, so incase anyone having problems with connecting via SSH to Ubuntu here is a simple walkthrough.
- Create or Copy Development machine’s public RSA located
~/.ssh/id_rsa.pub
- Login to server and paste it in
vim ~/.ssh/authorized_keys
- Ensure that
/etc/ssh/sshd_config
containsPubkeyAuthentication yes
andRSAAuthentication yes
uncommented - Finally set
chmod go-w ~/, chmod 700 ~/.ssh
, andchmod 600 ~/.ssh/authorized_keys
to make sure that permissions are set correctly
Update
For more information check this guide
http://library.linode.com/securing-your-server . Thanks to @kamasheto
Published by: Seif in Development