Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ssh prompting password

Status
Not open for further replies.

scient

IS-IT--Management
Oct 24, 2007
15
US
i try to ssh from hostA to hostB
>>>ssh hostB
it prompted me to enter password of hostB..all other hosts are not asking me to enter password whats the problem with this hostA even i run
hostA/root :/> ssh-keygen -t rsa -N "" -f $HOME/.ssh/id_rsa
Generating public/private rsa key pair.
Your identification has been saved in //.ssh/id_rsa.
Your public key has been saved in //.ssh/id_rsa.pub.
The key fingerprint is:
XXXXX6:42:ab:0d:38:1d:16:0e:be:9e:7b root@hostA

and

hostA/root: / > ssh-keygen -t rsa -N "" -f $HOME/.ssh/id_rsa
Generating public/private rsa key pair.
//.ssh/id_rsa already exists.
Overwrite (y/n)? y
Your identification has been saved in //.ssh/id_rsa.
Your public key has been saved in //.ssh/id_rsa.pub.
The key fingerprint is:
XXXXX79:66:2b:5e:91:02:97:27:03:4c:6e root@hostA

after i run

hostA/root: / > ssh hostB
root@hostB's password:

do i need to enter hostA entry in any file of hostB in order to autenticate????

any help appreciated..

Thank you..





 
do i need to enter hostA entry in any file of hostB in order to autenticate????
Yes, you do. The key generated by ssh-keygen on hostA needs to be added to the file <home directory>/.ssh/authorized_keys.

i.e. if the user is fred then the file will be (normally) /home/fred/.ssh/authorized_keys.

On the internet no one knows you're a dog

Columb Healy
 
on hostB i done

hostB/root: / # cd .ssh
hostB/root: /.ssh # ls -l
total 48
-rw-r--r-- 1 root system 221 Dec 14 14:40 authorized_keys
-rw------- 1 root system 887 Dec 14 12:47 id_rsa
-rw-r--r-- 1 root system 6714 Jan 19 12:31 known_hosts
-rw------- 1 root system 1024 Mar 25 2005 prng_seed
-rw------- 1 root system 887 Dec 14 12:41 ssh
hostB1/root: /.ssh # vi authorized_keys

and at the end line i copied the hostA generated key

XXXXX79:66:2b:5e:91:02:97:27:03:4c:6e root@hostA

again when i try to ssh from hostA to hostB it prompted me to enter password

hostA/root: / > ssh hostB
root@hostB's password:

any help ??

thank you..

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top