mirror of
https://github.com/linuxserver/docker-openssh-server.git
synced 2026-01-20 20:11:27 +08:00
Merge branch 'initial' of github.com:linuxserver/docker-openssh-server into initial
This commit is contained in:
commit
bf81b75211
@ -42,13 +42,11 @@ fi
|
||||
if [ "$PASSWORD_ACCESS" == "true" ]; then
|
||||
sed -i '/^#PasswordAuthentication/c\PasswordAuthentication yes' /etc/ssh/sshd_config
|
||||
sed -i '/^PasswordAuthentication/c\PasswordAuthentication yes' /etc/ssh/sshd_config
|
||||
sed -i '/UsePAM/c\UsePAM yes' /etc/ssh/sshd_config
|
||||
chown root:"${USER_NAME}" \
|
||||
/etc/shadow
|
||||
echo "User/password ssh access is enabled."
|
||||
else
|
||||
sed -i '/^PasswordAuthentication/c\PasswordAuthentication no' /etc/ssh/sshd_config
|
||||
sed -i '/UsePAM/c\#UsePAM no' /etc/ssh/sshd_config
|
||||
chown root:root \
|
||||
/etc/shadow
|
||||
echo "User/password ssh access is disabled."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user