<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">Dear
Sir,<br>
<br>
here is the exact process, which never failed for me till date
(atleast)!!<br>
<br>
AUTOMATING SSH
<br>
--------------<br>
making an automated(without asking password) process for SSH between
"bimalserver"(10.10.10.1) and "balwantserver"(10.10.10.5) do as
<br>
<br>
login on bimalserver as a general user "bimal" and execute ssh-keygen
command as...
<br>
<br>
[bimal@bimalserver bimal]$ ssh-keygen -t rsa
<br>
Generating public/private rsa key pair.
<br>
Enter file in which to save the key (<i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home/bimal<span class="moz-txt-tag">/</span></i>.ssh/id_rsa):
<br>
Created directory '<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>home/bimal<span
 class="moz-txt-tag">/</span></i>.ssh'.
<br>
Enter passphrase (empty for no passphrase):
<br>
Enter same passphrase again:
<br>
Your identification has been saved in <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home/bimal<span class="moz-txt-tag">/</span></i>.ssh/id_rsa.
<br>
Your public key has been saved in <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home/bimal<span class="moz-txt-tag">/</span></i>.ssh/id_rsa.pub.
<br>
The key fingerprint is:
<br>
b8:30:b8:b3:53:4c:29:60:0e:fe:5f:c0:58:3c:6e:df bimal@bimalserver
<br>
<br>
NOTE:-
<br>
------<br>
1) if you don't provide a file name it will create it at its own.
<br>
<br>
2) keep "passphrase" BLANK i.e. just hit enter when asked for,now you
need to put "id_rsa.pub"
<br>
file(in fact, content) onto other machine in the home of a user as of
whom you want to get in
<br>
e.g there is another machine "balwantserver" on which there is a user
"balwant"
<br>
<br>
so what you need to do is, in the "<i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home/balwant<span class="moz-txt-tag">/</span></i>.ssh/"
directory of user "balwant" of "balwantserver"
<br>
create a file "authorized_keys2" and put the content of "id_rsa.pub" of
user "bimal" of "bimalserver"
<br>
in it i.e. from bimalserver do
<br>
<br>
[bimal@bimalserver bimal]$ scp <i class="moz-txt-slash"><span
 class="moz-txt-tag">/</span>home/bimal<span class="moz-txt-tag">/</span></i>.ssh/id_rsa.pub
<br>
<a class="moz-txt-link-abbreviated"
 href="mailto:balwant@balwantserver:/home/balwant/.ssh/bimal_pub_key">balwant@balwantserver:/home/balwant/.ssh/bimal_pub_key</a>
(you need to provide balwant's password as of now)
<br>
<br>
now do on balwantserver
<br>
<br>
[balwant@balwantserver balwant]$ cd .ssh
<br>
<br>
[balwant@balwantserver .ssh]$ cat bimal_pub_key >>
authorized_keys2
<br>
<br>
now check whether this is working or not so, on server bimalserver
<br>
<br>
[bimal@bimalserver bimal]$ ssh -l balwant balwantserver whoami
<br>
<br>
this should return balwant, if not that means your ssh automated part
is having some error!! and
<br>
either of "US" has commited a mistake, please - recheck it and inform
me too...<br>
<br>
regards,<br>
<br>
Bimal Pandit<br>
<br>
</div>
</body>
</html>