I am trying to connect from my Ubuntu to my AIX box using ssh-key exchange to avoid having to authenticate. However, I am having trouble and keep getting a password prompt no mater what I try to avoid it.
- On my Ubuntu box, I have generated a pair of keys using ssh-keygen -t rsa to get pub/private keys.
- SCP'ed the public key to AIX box, added it to authorized_keys in the .ssh folder of the user that I will be logging in as.
- On my Ubuntu box, I run the below as root:
ssh -l nagios -i /omd/sites/oppy/.ssh/id.rsa.nagios 172.16.4.14 OppyCheck.aix
I would be expecting to login as user "nagios" on the remove box, however it asks for a password prompt. The pub/priv key was generated under the user nagios. I have tried generating it from the AIX box, and moving the private key to the Ubuntu box, no go.
Am I doing something wrong? I have this working successfully on my RHEL and VMWare linux boxes.
I looked on my AIX box the /etc/ssh/sshd_config and I see:
Back on AIX, I can see in /var/log/secure..
Sep 22 20:47:45 van-xxxx auth|security:info sshd: Failed password for nagios from 172.xx.x.xxx port 42272 ssh2
Any idea why this is not working?
root@van-nagios-vm:/omd/sites/oppy/.ssh# ls -l
-r--r----- 1 root root 397 2011-09-22 20:36 id.rsa.nagios
-rw-r--r-- 1 oppy oppy 400 2011-09-22 08:13 id.rsa.pub.root
-rw------- 1 oppy oppy 1675 2011-09-22 08:13 id.rsa.root
-rw-r--r-- 1 oppy oppy 6776 2011-09-22 19:20 known_hosts
# ls -l
drwx------ 2 nagios usr 256 Sep 22 20:37 .ssh
-r--r----- 1 nagios usr 1679 Sep 22 20:37 authorized_keys
-rw------- 1 nagios usr 1679 Sep 22 20:35 id_rsa
-rw-r--r-- 1 nagios usr 397 Sep 22 20:35 id_rsa.pub
-rw-r--r-- 1 nagios usr 394 Sep 22 20:36 known_hosts