Operating System - HP-UX
1748232 Members
3519 Online
108759 Solutions
New Discussion юеВ

Re: SSH with publickey and password both

 
SOLVED
Go to solution
Steven Schweda
Honored Contributor
Solution

Re: SSH with publickey and password both

> Why
> PasswordAuthentication no
> setting is not working?

I know nothing, but /opt/ssh/etc/sshd_config
around here says things like this:

[...]
# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
UsePAM yes
[...]


So, you might try:

ChallengeResponseAuthentication no
or:
UsePAM no


"man sshd_config", too.
SANTOSH S. MHASKAR
Trusted Contributor

Re: SSH with publickey and password both

Thanks Steve,

It worked.

By commenting

#ChallengeResponseAuthentication no

and

setting

UsePAM no

in sshd_config I got the result.


-Santosh Mhaskar
SANTOSH S. MHASKAR
Trusted Contributor

Re: SSH with publickey and password both

The result is as below,

-----------------------------
Connected to user1@server2 from user1@server1 giving incorrect passphrase

server1:/home/user1/.ssh>ssh -Y user1@server2
Enter passphrase for key '/home/user1/.ssh/id_rsa':
Enter passphrase for key '/home/user1/.ssh/id_rsa':
Enter passphrase for key '/home/user1/.ssh/id_rsa':
Permission denied (publickey,keyboard-interactive).
server1:/home/user1/.ssh>
--------------------------------

-Santosh