Here are the simple steps to connect to a SSH server with private key:
- on client machine, generate a pair of private key and public key with this command:
ssh-keygen -t dsa
it will generate a pair of private and public keys in:
${user.home}/.ssh/id_dsa
${user.home}/.ssh/id_dsa.pub - add the public keys (the text in id_dsa.pub) to server's ${user.home}/.ssh/authorized_keys
create the folder if it's not existed, where ${user.home} is the user name that will be used to ssh to the server.
0 comments: (+add yours?)
Post a Comment