Re: Problem with SSH on Solaris 9

From: Charles Soto (charles@gtemail.net)
Date: 03/27/03


From: charles@gtemail.net (Charles Soto)
Date: 27 Mar 2003 12:07:10 -0800

christianlcr@netcourrier.com (christian) wrote in message news:<82c0f15f.0303270751.21f353f5@posting.google.com>...
> Hi all,
>
> Running on Solaris 9 09/12
> On my own account, I want to create an authorized_keys file.
>
> Under my .ssh, I've got :
>
> id_dsa
> id_dsa.pub
> id_rsa
> id_rsa.pub
> known_hosts
>
> I copy the contain of my id_rsa.pub under the authorized_keys file.
> The fact is that, when I connected on my own account, the system
> always ask me the password.
> On SSH 2.2, I copy the contain of identity.pub under the
> authorized_keys file and It works.
>
> SO What's wrong on my configuration ????
> Thanks,
>
> Christian.

What good is having the key for that host/user combination in
authorized keys? You need the keys to the host you are connecting
FROM in that file.

Do this:

HOST1 (you run ssh on this one to connect to HOST2):

ssh-keygen -t dsa (use defaults- hit enter to leave blank key
passphrase)
ssh-keygen -t rsa ( " " " )
cd .ssh
cat id_dsa.pub id_rsa.pub host1.keys
scp host1.keys host2.yourdomain.net:host1.keys (need to enter your
password)
rm host1.keys

HOST2 (running sshd)

cd
mv host1.keys .ssh/authorized_keys

Now you will be able to log into HOST2 from HOST1 without a password.

This also assumes that "RSAAuthentication yes" exists in your
/etc/ssh/sshd_config (this is the default).

Charles



Relevant Pages

  • Confusing issue with scp - Host Key Authentication Failed
    ... I can ssh from host1 to host2 with no problems. ... I can scp from host1 to host2 with no problems. ... Since I can ssh to the host, I know keys are correct so why do I get the failure? ...
    (comp.security.ssh)
  • SSH through another computer
    ... I am forced to SSH to host1, and SSH from there to host2. ... I have a private key in localhost, which is accepted for SSH by host2. ...
    (Debian-User)
  • Re: How to open an application in a remote x session
    ... I want the user on host2 to ssh to host1, then run say gedit which ... will opne up on the xdisplay the user has running on host1. ... ssh -Y user@host1 ...
    (Fedora)
  • Re: Confusing issue with scp - Host Key Authentication Failed
    ... DJ> I can ssh from host1 to host2 with no problems. ... But when I try to scp ... DJ> Since I can ssh to the host, I know keys are correct so why do I ...
    (comp.security.ssh)
  • Re: Passing password in ssh
    ... If I create keys without a passphrase, and share the public keys between ... You do know that you first have to get the private key of the key ... The .ssh directory also ... But simply cracking into a user's account who has access to several ...
    (Fedora)