You need to use the ssh-keygen command as follows to generate RSA keys (open terminal and type the following command):
ssh-keygen -t rsa
OR
ssh-keygen
Sample outputs:
Enter file in which to save the key (/home/vivek/.ssh/id_rsa):The -t type option specifies the type of key to create. The possible values “rsa” or “dsa” for protocol version 2. The $HOME/.ssh stores the following two files:
Created directory '/home/vivek/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/vivek/.ssh/id_rsa.
Your public key has been saved in /home/vivek/.ssh/id_rsa.pub.
The key fingerprint is:
58:3a:80:a5:df:17:b0:af:4f:90:07:c5:3c:01:50:c2 vivek@debian
- $HOME/.ssh/id_rsa - Your private RSA key
- $HOME/.ssh/id_rsa.pub - Your public RSA key
ssh-copy-id userName@server2.nixcraft.net.in
Finally, you can login to remote server as follows:
ssh userName@server2.nixcraft.net.in
scp file.txt userName@server2.nixcraft.net.in:~/data2/
No comments:
Post a Comment