Operating System - HP-UX
1833044 Members
2579 Online
110049 Solutions
New Discussion

Unable to connect to hp-unix server with putty over ssh using public/private key.

 
GnanaShekar
Regular Advisor

Unable to connect to hp-unix server with putty over ssh using public/private key.

Hi,

I am getting the following error message, when connect to a HPUnix server with putty over ssh using public/private key. I have put the public key in $HOME/.ssh/authorized_keys file. I am using the private key in putty. I have used a empty passphrase, so it should allow me to connect to server without asking for password.

Using username "root".
Server refused our key
Using keyboard-interactive authentication.
Password:
Last login: Sat Mar 11 09:46:22 2006 from 172.22.45.158
#
# uname -a
HP-UX tcshp11i B.11.11 U 9000/800 768957655 unlimited-user license
# ssh -version
OpenSSH_4.2p1-hpn, OpenSSL 0.9.7i 14 Oct 2005
HP-UX Secure Shell-A.04.20.004, HP-UX Secure Shell version
Bad escape character 'rsion'.
#

I am able to connect to other HP-Unix, Linux, Solaris and AIX server with this procedure.

Please suggest,
Thanks & Regards,
-GnanaShekar-
3 REPLIES 3
Steven E. Protter
Exalted Contributor

Re: Unable to connect to hp-unix server with putty over ssh using public/private key.

Shalom Sir,

Could be a lot of things.

On the target server:

tail -f /var/adm/syslog/syslog.log

try to connect

If its a network issue you will see nothing on the syslog. If not you will get useful diagnostics.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
RAC_1
Honored Contributor

Re: Unable to connect to hp-unix server with putty over ssh using public/private key.

post sshd -ddd from server you are trying to connect to.
There is no substitute to HARDWORK
GnanaShekar
Regular Advisor

Re: Unable to connect to hp-unix server with putty over ssh using public/private key.

Hi,

Thanks for the input.
From the logs I found that it is a permission issue on the .ssh folder & authorized_keys file in that folder. I set the permissions as below and it resolved the issue.

# ls -ld .ssh
drwx------ 2 root sys 8192 Mar 11 11:02 .ssh
# cd .ssh
# ls -l
total 48
-rw-r--r-- 1 root sys 226 Mar 11 09:47 authorized_keys
-rw-r--r-- 1 root sys 540 Mar 11 09:47 known_hosts
-rw------- 1 root sys 1024 Mar 11 11:02 prng_seed


Thanks a lot.
Thanks & Regards,
-Gnanashekar-