-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH_DISABLE_PASSWORD_AUTH affects LOCALE #130
Comments
Worth mentioning: The relevant PAM configuration file is |
Raspberry Pi Foundation recommends PAM is a complex subsystem, much more than authentication. One of the things PAM does is accept the locale from the client. Details in an answer on serverfault.com SSH locale wrong. However, this exposes the system to an external source of data which is then trusted as a lookup key. Arguably, if we're giving an SSH unrestricted command capability, we need not care about also protecting against hostile environment variables on the SSH client system. I don't know what else misbehaves as a result of enabling UsePAM. |
Agreed, PAM is a complex beast. Setting
Just to be sure we are on the same page: This issue is not about getting the locale from the client. The locale from the client is actually still loaded by |
Setting
SSH_DISABLE_PASSWORD_AUTH=true
will currently setUsePAM
tono
in/etc/ssh/sshd_config
. This has the unfortunate side effect that/etc/default/locale
is not used when logging in via ssh (usingpublickey
authentication).This leads to
LOCALE
andLC_*
keeping the values they had on the system the user is logging in from, which can lead to a broken locale, when logging in from a non-linux machine. Here is an example of an error one might see due to this (LC_CTYPE
isUTF-8
, which is the default on macOS, but invalid on linux):The text was updated successfully, but these errors were encountered: