Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 82274 - OpenSSH: with 'UsePAM=no' in sshd_config, unable to log into server with private/public key setup. Get 'Permission Denied'.
Summary: OpenSSH: with 'UsePAM=no' in sshd_config, unable to log into server with priv...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-16 11:34 UTC by xyon
Modified: 2006-09-19 20:01 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description xyon 2005-02-16 11:34:51 UTC
I first noticed this problem when logging in via ppk. After entering the passphrase incorrectly 3 times, I was presented with a password prompt that worked, even though I had 'PasswordAuthentication=no' in the sshd_config file. In order to rectify this, I set 'UsePAM=no', but was no longer able to log into the server via ssh. I hence have set 'ChallengeResponseAuthentication=no' and 'UsePAM=yes', and I can log in using public key only, and no password prompts. Is this a correct workaround/solution, or is there a security risk? Is this a bug, or am I off base here?

Please see my post here:
http://forums.gentoo.org/viewtopic-p-2099561.html

Reproducible: Always
Steps to Reproduce:
1. Set UsePAM=no in sshd_config
2. Restart sshd
3. Try to login via ppk

Actual Results:  
Get the following error when ssh'ing into that box:
Permission denied (publickey).

Expected Results:  
To Login via ssh without PAM Authentication
Comment 1 SpanKY gentoo-dev 2005-02-18 19:55:06 UTC
PasswordAuthentication is different from UsePAM ... but having PAM enabled usually does produce unexpected behavior such as you've described here ...

when setting up a server that only allowed access via ssh keys, i set PasswordAuthentication and UsePAM to 'no' and it has always worked fine ... but ive never done keys which required passphrases
Comment 2 xyon 2005-03-11 11:56:05 UTC
I think you are on to something here. I just disabled passphrases on my ppk setup, and set 'UsePAM no', and was able to successfully login via ssh. As soon as I used a ppk user with passphrases, I get the permission denied. Does passphrases somehow require PAM? I really don't like the thought of all my ssh activity being forced to use PAM in order to use passphrases, or being forced to not use passphrases. There has got to be a solution to this issue, right? Maybe some compile-time magic?
Comment 3 SpanKY gentoo-dev 2005-03-13 02:35:31 UTC
i assume you're emerging with USE=pam ... what if you try USE=-pam ?
Comment 4 xyon 2005-03-13 07:42:16 UTC
If I emerge with 'USE="-pam"' I get the same behavior as if I used 'UsePAM no' in sshd_config. Except when openssh is emerged with -pam, I can't use 'UsePAM yes' to fix it, I must re-emerge it with USE="pam". 
Comment 5 SpanKY gentoo-dev 2005-03-14 12:22:00 UTC
this looks like Bug 65343 ... it looks like aliz didnt rev bump openssh after adding the pamfix to the 3.9_p1-r1 ebuild though ...
Comment 6 xyon 2005-03-15 05:06:21 UTC
OpenSSH_4.0p1 does not resolve this issue for me.
Comment 7 Daniel Webert 2005-05-11 09:41:13 UTC
ping - any solution?
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2005-11-11 09:41:37 UTC
Re-assign, aliz seems MIA. 
Comment 9 Marco Nogara 2006-02-22 05:40:58 UTC
any news on this bug?
Comment 10 Daniel Webert 2006-03-06 07:36:37 UTC
using this options i have no probs logging in ppk w/ passphrases

* [ebuild   R   ] net-misc/openssh-4.2_p1-r1  USE="chroot ipv6 ldap pam sftplogging smartcard tcpd -X509 -hpn -kerberos -libedit -skey -static" 0 kB 
* UsePAM=no 
* PasswordAuthentication=no
* ChallengeResponseAuthentication=no

xyon plz try this combo - so we can close this bug soon
Comment 11 SpanKY gentoo-dev 2006-09-19 20:01:26 UTC
old