HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

SSH password less login not working

 
SOLVED
Go to solution
shameemsoft
Frequent Advisor

SSH password less login not working

Hello,

Copied public key to destination server. but password less login is not working. But same public key, i tried with different server. it is working. please find debug output below.

debug1: Host 'xxxx' is known and matches the RSA host key.
debug1: Found key in /homeroot/.ssh/known_hosts:19
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /homeroot/.ssh/identity
debug1: Trying private key: /homeroot/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /homeroot/.ssh/id_dsa
debug1: read PEM private key done: type DSA
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive

OS is HPUNIX 11.31 update 6 & SSH version is

SecureShell A.05.30.009 HP-UX Secure Shell

Kindly provide your input to resolve this issue.

Regards
Shameem
11 REPLIES
Turgay Cavdar
Honored Contributor
Solution

Re: SSH password less login not working

On the destination server, the user home directory is writable by others or group?
rariasn
Honored Contributor

Re: SSH password less login not working

Hi:

>>> Copied public key to destination server. but password less login is not working. But same public key, i tried with different server. it is working. please find debug output below


Copied and add publick que to "authorized_keys" file

rgs,

shameemsoft
Frequent Advisor

Re: SSH password less login not working

Hello Turgey,

700 is home directory permission.

Regards
Shameem
Shibin_2
Honored Contributor

Re: SSH password less login not working

I think, you need to regenerate the RSA key.

See some threads for your reading.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1418482
Regards
Shibin
shameemsoft
Frequent Advisor

Re: SSH password less login not working

Hi Rarisan,

I have copied public key into authroized_keys file only :).

Regards
Shameem
shameemsoft
Frequent Advisor

Re: SSH password less login not working

Hi Shibin,

I tried many times. But it is not working. I tried with other destination servers. It is working. only one server, i am facing this issue.

Regards
Shameem
Turgay Cavdar
Honored Contributor

Re: SSH password less login not working

Hi again,
Can you do a "loopback test" on the destination server? Create the keys (if not exist) on the destination server for the destination user.Then add the destination user's public key to authorized_keys. At last try to connect the user itself and see what happens..
Steven Schweda
Honored Contributor

Re: SSH password less login not working

> [...] i tried with different server. it is
> working. [...]

With my weak psychic powers, I can't see the
files on a working system or on the
non-working system. Have you compared them
(content, owner, permissions)? I also can't
see the actual ssh command, or who's running
it. (Does "/homeroot/" mean that this is the
"root" user? "root" is special.)

Are the ssh server configuration files the
same?

Is there anything interesting in the system
log file(s) on the non-working system?

> debug1: Authentications that can continue: publickey,password,keyboard-interactive
> debug1: Next authentication method: keyboard-interactive

Apparently, this server hates all your key
files, or else it hates you. (That's
especially likely if you're "root".)
shameemsoft
Frequent Advisor

Re: SSH password less login not working

Hello Guys,

Issue is resolved. But I am surprised...

I checked sshd_config file. PubkeyAuthentication is disbaled. I have enabled this parameter then restart secure shell. it started to working.

Also i checked in other servers, this paramter is disabled. but passwordless login is working.

So i tried to disbale it again on this server(problem server) and restarted secure shell.. it is continously working without password. No issue with this.

Do u have any idea about this?

Thank you guys for your support.

Regards
Shameem

Steven Schweda
Honored Contributor

Re: SSH password less login not working

> I checked sshd_config file. [...]

Which "sshd_config file"? What, exactly, did
you find?

> PubkeyAuthentication is disbaled.

What, exactly, led you to that conclusion?
My "/opt/ssh/etc/sshd_config" file includes
this comment:

[...]
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
[...]

So, if I found, say,
#PubkeyAuthentication yes
in my (unmodified) file, then I would figure
that "PubkeyAuthentication yes" was the
default condition, and that removing that "#"
would change nothing.

> I have enabled this parameter [...]

How, exactly?

> then restart secure shell.

How, exactly?

> it started to working.

If you say so.

> Also i checked in other servers, this
> paramter is disabled. but passwordless
> login is working.

See above. As usual, showing actual commands
with their actual output (or actual file
contents) can be more helpful than vague
descriptions or interpretations. With my
weak psychic powers, I can't see what you
see, or what you did, and I can't trust your
vague descriptions or your interpretation of
what it all means.

> Is there anything interesting in the system
> log file(s) on the non-working system?

And you don't answer questions.

> So i tried [...]

Again, no reliable, useful information here.
madhuchakkaravarthy
Trusted Contributor

Re: SSH password less login not working

hi shameen

So i tried to disbale it again on this server(problem server) and restarted secure shell.. it is continously working without password. No issue with this

----------------------------


but how this is possiable ??????

nothing do with ssh config and restarting sshd

i hope this might not be the issue.

check the correct key copied to destination.

set permission to 700 for .ssh and 600 for authorized_keys

only thing to notify is path of where key should be placed in sshd_config.


regards

Madhu