2008/12/7 Dilip M <[EMAIL PROTECTED]>:

Hi,

> My first post to this list....after googling the web to find the
> solution.
>
> I have 2 box. One running Redhat (OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19
> 2003) and other Ubuntu(OpenSSH_4.6p1 Debian-5build1, OpenSSL 0.9.8e 23
> Feb 2007).
>
> I am trying to do password less login _from_ redhat _to_ ubuntu box. It
> works for different user ID, but not for same user id.
>
> i.e If [EMAIL PROTECTED] ssh's to [EMAIL PROTECTED], it works.
>
> But when, [EMAIL PROTECTED] ssh'd to [EMAIL PROTECTED], it doesn't work.
>
> PS: Home directory is common across box. (NIS ID's)
>
> ---log ---
> $ ssh-keygen -t rsa
> Generating public/private rsa key pair.
> Enter file in which to save the key (/home/dilipm/.ssh/id_rsa):
> Enter passphrase (empty for no passphrase):
> Enter same passphrase again:
> Your identification has been saved in /home/dilipm/.ssh/id_rsa.
> Your public key has been saved in /home/dilipm/.ssh/id_rsa.pub.
> The key fingerprint is:
> d4:db:36:3a:dd:9e:6d:c0:31:4a:75:d9:b9:9d:9d:c2 [EMAIL PROTECTED]
>
> $cat id_rsa.pub >> authorized_keys

You are doing it on a server, right?

I usually perform next steps to setup a passwordless login (all
commands done on a client side, that is where you are connecting from,
in your case "user" is the same that you are logged in on a client):

$ ssh-keygen -t dsa -N '' -b 1024

$ ssh-copy-id -i ~/.ssh/id_dsa.pub [EMAIL PROTECTED]

In case there is no ssh-copy-id (for example, an older box) I use
next: cat ~/.ssh/id_dsa.pub | ssh [EMAIL PROTECTED] "cat >>
~/.ssh/authorized_keys"

Testing:

$ ssh [EMAIL PROTECTED]

ssh-copy-id comes with openssh client package.

If that does not help I'd suggest you to check the contents of
~/.ssh/authorized_keys on remobe box if it contains some older keys
for that user.

If that still won't help I suggest you check the permissions of ~/ssh
directories on both the client and the server sides. Certain
files/directories should not have access to world, and definitely no
write access to world. You can run next command both on the client and
the remote box sides and show the output to us:

$ find ~/.ssh -ls

Cheers,

VL

Reply via email to