[K12OSN] Re:No luck with ssh key storing for users (info)

Bimal Pandit bimal.pandit at indoasian.com
Fri May 20 12:04:50 UTC 2005


Dear Sir,

here is the exact process, which never failed for me till date (atleast)!!

AUTOMATING SSH
--------------
making an automated(without asking password) process for SSH between 
"bimalserver"(10.10.10.1) and "balwantserver"(10.10.10.5) do as

login on bimalserver as a general user "bimal" and execute ssh-keygen 
command as...

[bimal at bimalserver bimal]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/bimal/.ssh/id_rsa):
Created directory '/home/bimal/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/bimal/.ssh/id_rsa.
Your public key has been saved in /home/bimal/.ssh/id_rsa.pub.
The key fingerprint is:
b8:30:b8:b3:53:4c:29:60:0e:fe:5f:c0:58:3c:6e:df bimal at bimalserver

NOTE:-
------
1) if you don't provide a file name it will create it at its own.

2) keep "passphrase" BLANK i.e. just hit enter when asked for,now you 
need to put "id_rsa.pub"
file(in fact, content) onto other machine in the home of a user as of 
whom you want to get in
e.g there is another machine "balwantserver" on which there is a user 
"balwant"

so what you need to do is, in the "/home/balwant/.ssh/" directory of 
user "balwant" of "balwantserver"
create a file "authorized_keys2" and put the content of "id_rsa.pub" of 
user "bimal" of "bimalserver"
in it i.e. from bimalserver do

[bimal at bimalserver bimal]$ scp /home/bimal/.ssh/id_rsa.pub
balwant at balwantserver:/home/balwant/.ssh/bimal_pub_key (you need to 
provide balwant's password as of now)

now do on balwantserver

[balwant at balwantserver balwant]$ cd .ssh

[balwant at balwantserver .ssh]$ cat bimal_pub_key >> authorized_keys2

now check whether this is working or not so, on server bimalserver

[bimal at bimalserver bimal]$ ssh -l balwant balwantserver whoami

this should return balwant, if not that means your ssh automated part is 
having some error!! and
either of "US" has commited a mistake, please - recheck it and inform me 
too...

regards,

Bimal Pandit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/k12osn/attachments/20050520/de26dfbc/attachment.htm>


More information about the K12OSN mailing list