what are the steps for Password-less ssh

Answers were Sorted based on User's Feedback



what are the steps for Password-less ssh..

Answer / mitti joshi

check this link for solution
http://www.adeptus-mechanicus.com/codex/contrib/nm-ssh1/nm-ssh1.html

Is This Answer Correct ?    4 Yes 0 No

what are the steps for Password-less ssh..

Answer / sathyaraj

Using the below command to generate the ssh keys

ssh-keygen -t rsa
cat .ssh/id_rsa.pub | ssh docadm@172.25.64.71 'cat
>> .ssh/authorized_keys'

copy the ssh keys to the other server in the authorized
keys file once the 2048 passphrase has been copied the user
can able to login to the server without password.....

Is This Answer Correct ?    4 Yes 0 No

what are the steps for Password-less ssh..

Answer / jani

Step 1: Create Authentication SSH-Kegen Keys on – (192.168.1.1)
First login into server 192.168.1.1 with user tecmint and generate a pair of public keys using following command.
[tecmint@tecmint.com ~]$ ssh-keygen -t rsa

Generating public/private rsa key pair.
Enter file in which to save the key (/home/tecmint/.ssh/id_rsa): [Press enter key]
Created directory '/home/tecmint/.ssh'.
Enter passphrase (empty for no passphrase): [Press enter key]
Enter same passphrase again: [Press enter key]
Your identification has been saved in /home/tecmint/.ssh/id_rsa.
Your public key has been saved in /home/tecmint/.ssh/id_rsa.pub.
The key fingerprint is:
af:bc:25:72:d4:04:65:d9:5d:11:f0:eb:1d:89:50:4c tecmint@tecmint.com
The key's randomart image is:
+--[ RSA 2048]----+
| ..oooE.++|
| o. o.o |
| .. . |
| o . . o|
| S . . + |
| . . . o|
| . o o ..|
| + + |
| +. |
+-----------------+
Step 2: Create .ssh Directory on – 192.168.1.2
Use SSH from server 192.168.1.1 to connect server 192.168.1.2 using sheena as user and create .ssh directory under it, using following command.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2 mkdir -p .ssh

The authenticity of host '192.168.1.2 (192.168.1.2)' can't be established.
RSA key fingerprint is d6:53:94:43:b3:cf:d7:e2:b0:0d:50:7b:17:32:29:2a.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.1.2' (RSA) to the list of known hosts.
sheena@192.168.1.2's password: [Enter Your Password Here]
Step 3: Upload Generated Public Keys to – 192.168.1.2
Use SSH from server 192.168.1.1 and upload new generated public key (id_rsa.pub) on server 192.168.1.2 under sheena‘s .ssh directory as a file name authorized_keys.
[tecmint@tecmint ~]$ cat .ssh/id_rsa.pub | ssh sheena@192.168.1.2 'cat >> .ssh/authorized_keys'

sheena@192.168.1.2's password: [Enter Your Password Here]
Step 4: Set Permissions on – 192.168.1.2
Due to different SSH versions on servers, we need to set permissions on .ssh directory and authorized_keys file.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2 "chmod 700 .ssh; chmod 640 .ssh/authorized_keys"

sheena@192.168.1.2's password: [Enter Your Password Here]
Step 5: Login from 192.168.1.1 to 192.168.1.2 Server without Password
From now onwards you can log into 192.168.1.2 as sheena user from server 192.168.1.1 as tecmint user without password.
[tecmint@tecmint ~]$ ssh sheena@192.168.1.2

Is This Answer Correct ?    1 Yes 0 No

what are the steps for Password-less ssh..

Answer / vivek

This is not the correct way to set password-less ssh.
visit following link to accuratly setup password-less ssh

Is This Answer Correct ?    0 Yes 3 No

what are the steps for Password-less ssh..

Answer / teja

open the ssh configration file /etc/ssh/sshd_conf like this

#vi /etc/ssh/sshd_conf
Here you can see "Password Auth = yes" dhange it to no
i.e.,
"Password Auth = no" and save and exit.
Now restart the service sshd with "Service sshd restart"
cmd and try to connect to another machine using its IP ....
now it wont ask u for password...

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More Linux AllOther Interview Questions

Hi all Could u plz tell me how I can get UNIX/Linux Certification

2 Answers   Accenture,


Friends, I don't have enough free space in root directory. but in home directory I have 40gb free. So I can not install anything in root directory (which occupies more space) Please suggest me If there is any possibility to increase the root directory size by minimising the home directory's.

3 Answers  


there are many IPC mechanisms available in Linux ? Which one is best to use and when ?

1 Answers   Broadcom,


Give a Linux shell command to find all files in a directory which contain ip addresses.

1 Answers   Amazon,


what is meant by mysql clustering

2 Answers  






i want to install XP on RHEL5 with virtualization tell me step by step configuration

1 Answers  


Where is standard output usually directed?

2 Answers  


I have accidently deleted my fstab... how do i recover/ regenerate the file?????? in rescue mode i cannot create a new file since the filesystem is readonly and could not mount in readwrite mode ?????????

6 Answers   IBM,


how do you configure linux system as a router?

4 Answers   HCL,


How to check all open ports on linux machine and block unsed ports????????

7 Answers   Tech Mahindra,


why /etc/shadow file do not have any permission ?

0 Answers   IBM,


What is the use of DNS Server? Name other servers works same as like DNS?

2 Answers  


Categories