Sunday, 17 February 2013

Notes for setting up openssh server in Linux for Public Key Authentication only

On Client Machine
ssh-keygen -t rsa -b 1024
check to see if permissions for id_rsa is rw-------

On Client Machine copy public key to the server:
scp id_rsa.pub server@192.168.0.1:/home/server

On Server Machine append public key to authorized_keys
cat id_rsa.pub >> ~/.ssh/authorized_keys

On Server Machine
sudo nano /etc/ssh/sshd_config
Edit these...
%h/.ssh/authorized_keys
PubkeyAuthentication yes
PermitRootLogin        no
PasswordAuthentication    no
UsePAM            no


WindyCityTech Blogger
WindyWindyCityTech Wordpress

No comments:

Post a Comment