2. Create the directory “.ssh” under home dir of manmohan as below:
[manmohan@kalwa1 ~]$ pwd
/home/manmohan
[manmohan@kalwa1 ~]$ mkdir .ssh
[manmohan@kalwa1 ~]$ ls -lal
total 28
drwx------. 3 manmohan manmohan 4096 Jun 27 22:37 .
drwxr-xr-x. 5 root root 4096 May 31 20:13 ..
-rw------- 1 manmohan manmohan 10 Jun 27 22:37 .bash_history
-rw-r--r--. 1 manmohan manmohan 18 Jan 27 2011 .bash_logout
-rw-r--r--. 1 manmohan manmohan 176 Jan 27 2011 .bash_profile
-rw-r--r--. 1 manmohan manmohan 124 Jan 27 2011 .bashrc
drwxrwxr-x 2 manmohan manmohan 4096 Jun 27 22:37 .ssh
3. Now generate the public key using the command “ssh-keygen”
[manmohan@kalwa1 ~]$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/manmohan/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/manmohan/.ssh/id_rsa. Your public key has been saved in /home/manmohan/.ssh/id_rsa.pub. The key fingerprint is: f5:ec:f9:e6:38:cb:2b:d6:14:3d:06:31:47:f2:f3:df manmohan@kalwa1.home.com The key's randomart image is: +--[ RSA 2048]----+ | +oo | | .= | | . oo | | . o. +o | | S oo ..| | ... o| | oo E| | o.oo. | | . .=*o | +-----------------+
Press enter for asked question if you do not want any change.
BI says
For point 5; You can also use the ssh-copy-id command
source_server# ssh-copy-id destination_server
admin says
THanks for your comment!!!