mirror of
https://github.com/grey-cat-1908/portable-mc-server.git
synced 2024-11-11 18:57:27 +03:00
10 lines
289 B
Bash
10 lines
289 B
Bash
|
if [[ -z "$SSH_PASSWORD" ]]; then
|
||
|
export SSH_PASSWORD=admin
|
||
|
fi
|
||
|
|
||
|
mkdir /var/run/sshd
|
||
|
echo "root:$SSH_PASSWORD" | chpasswd
|
||
|
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
|
||
|
sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
|
||
|
|
||
|
exec /usr/sbin/sshd -D
|