Switches, Hubs, and Modems
1752590 Members
2882 Online
108788 Solutions
New Discussion юеВ

Re: passwordless login to HP-UX server from window's client using putty

 
AJOY
Occasional Contributor

passwordless login to HP-UX server from window's client using putty

We have installed SSH in our HP-UX 11.11 server. Now we want to connect to this server from a PC having Windows XP. We have tried this using two-keys generated by puttygen. we have placed the public key in .ssh directory under home directory of the user which is used to connect the server. But still it is asking the password of the user. What is exact procedure to connect without password of the user ?

Ajoy Sonowal.
6 REPLIES 6
Senthil Prabu.S_1
Trusted Contributor

Re: passwordless login to HP-UX server from window's client using putty

Hi,
Placing the SSH public keys will not help. Check out the permissions of the $HOME/.ssh and
the public key file. They should be 700 and 0600.

Also, look out the sshd.conf at the server. And look at the putty ssh configuration. Also
look at the help menu and look at the FAQ and check out what waws the answer given for the
error message you got.


If still stuck with issues, post the error and config files here.


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
AJOY
Occasional Contributor

Re: passwordless login to HP-UX server from window's client using putty

Hello Prabhu,

I have done the following steps :

1. Created public(ajs.pub) and private keys(ajs.pub) using puttygen from the PC running Windows XP.

2. This ajs.pub is put in the HP-UX server under home director of the user id "ajs" and copied this file to .ssh directory under this home directory. e.g
# pwd
/var/home/ajs/.ssh
# ll
total 16
-rwx------ 1 ajs basis 294 Feb 2 16:58 ajs.pub

3. Now, if I try to login from the PC to this HP-UX server, it asking the password as follows :

C:\putty>plink ajs
Using username "ajs".
Server refused our key
Using keyboard-interactive authentication.
Password:

Also if we try to use psftp, then also it asking password :
C:\putty>psftp ajs
Using username "ajs".
Server refused our key
Using keyboard-interactive authentication.
Password:
Remote working directory is /var/home/ajs
psftp> ls

(ajs is also a session name created by using putty and giving IP, user name, private key file)

So what to do next to login to the server without password ?

Also configuration file of SSH server(HP-UX)is attached.

Ajoy Sonowal.

Senthil Prabu.S_1
Trusted Contributor

Re: passwordless login to HP-UX server from window's client using putty

Hi,
the permission for /.ssh dir should be 700.
And public key should be named as ~/.ssh/authorized_keys. It should have permission 0600.

And look at your sshd.conf for following two lines

#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys

these should be uncommented out.

They this........


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
Senthil Prabu.S_1
Trusted Contributor

Re: passwordless login to HP-UX server from window's client using putty

Hi,
Attached files tells about password less authentication between two unix machines. But this hold common for you also, I believe.

check out them.
Also, second file contains a sample of ssh.conf and sshd.conf file.


HTH,
Prabu.S
One man's "magic" is another man's engineering. "Supernatural" is a null word.
AJOY
Occasional Contributor

Re: passwordless login to HP-UX server from window's client using putty

Hello Prabhu,

I tried from windows client to HP-UX server using PLINK and PSFTP. Still I am getting the same error as follows :

C:\putty>psftp ajs
Using username "ajs".
Server refused our key
Using keyboard-interactive authentication.
Password:

I have created public key and private key in this windows client using puttygen. Then I copied this public key file to .ssh directory under home directory of user "ajs" in HP-UX server. Also i have changed the permission of this public key file and moved to authorized_keys file.

# pwd
/var/home/ajs/.ssh
# ll
total 32
-rw------- 1 ajs basis 294 Feb 2 16:58 ajs.pub
-rw------- 1 ajs basis 294 Feb 3 10:48 authorized_keys
#

Also I have remove # of the following entries :
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

from the sshd_config file of the HP-UX server.

So, what I should do next.

Ajoy Sonowal.
Douglas McLaughln
New Member

Re: passwordless login to HP-UX server from window's client using putty

I am trying to attempt a passwordless login to a HPUX box from a Solaris box. This is not the only machine I have attempted the passwordless login for, but the HPUX machine is the only one which does not work.

I can login to another Solaris machine and a Linux machine perfectly from Solaris, just the HPUX machine still causes SSH to ask for BOTH the key's passphrase AND the account's password.

The Solaris machine's public key is in the HPUX user's .ssh directory as authorized_keys and both the directory and the the file have the correct permissions. The following lines are NOT commented in the HPUX machine's sshd_config file:

RSAAuthentication yes
PubkeyAuthentication yes
AuthorizedKeysFile .ssh/authorized_keys

Is there anything else I'm missing?