Friday, June 28, 2013

ssh key custom name note

this is just for me.

$ ssh-keygen -t rsa -b 2048 -f ~/id_rsa-taskrelatedkey
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase): [press enter here]
Enter same passphrase again: [press enter here]
Your identification has been saved in /home/me/id_rsa-taskrelatedkey.
Your public key has been saved in /home/me/id_rsa-taskrelatedkey.pub.
The key fingerprint is:
8c:57:af:68:cd:b2:7c:aa:6d:d6:ee:0a:5a:a4:29:03 me@home

Now copy the public key to the remote machine via scp:

$ scp ~/id_rsa-taskrelatedkey.pub someuser@there:~

on there:
$ mkdir ~/.ssh
$ chmod 700 ~/.ssh
$ mv ~/id_rsa-taskrelatedkey.pub ~/.ssh/
$ cd ~/.ssh/
$ touch authorized_keys2
$ chmod 600 authorized_keys2
$ cat id_rsa-taskrelatedkey.pub >> authorized2_keys
Post a Comment