Start by generating a private/public key set.
Run the following command:
$ ssh-keygen -t rsa
Now go to your local .ssh folder.
Then download the "authorized_keys" file from the server
scp user@server.com:/home/user/.ssh/authorized_keys .
then make a backup copy of the file:$ cp authorized_keys authorized_keys.backup
now merge public key id_rsa.pub into the authorized_keys file$ cat authorized_keys id_rsa.pub
and upload the authorized_keys file to the server$ scp authorized_keys user@server.com:/home/user/.ssh
Now try and connect via ssh:
$ ssh user@server.com
It should now not prompt for password.
No comments:
Post a Comment