Add SSH configuration setup in service.ssh.sh if not present
All checks were successful
Build a dev image / build (push) Successful in 21s
All checks were successful
Build a dev image / build (push) Successful in 21s
This commit is contained in:
parent
ec7c99328c
commit
2c3e6aca0c
1 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,15 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ ! -e /etc/ssh/sshd_config ]; then
|
||||||
|
mkdir -p /etc/ssh/sshd_config.d
|
||||||
|
echo "Include /etc/ssh/sshd_config.d/*.conf
|
||||||
|
PermitRootLogin yes
|
||||||
|
AuthorizedKeysFile .ssh/authorized_keys
|
||||||
|
PasswordAuthentication yes
|
||||||
|
AllowTcpForwarding yes
|
||||||
|
GatewayPorts no
|
||||||
|
X11Forwarding no
|
||||||
|
Subsystem sftp internal-sftp" > /etc/ssh/sshd_config
|
||||||
|
fi
|
||||||
|
|
||||||
exec /usr/sbin/sshd -D
|
exec /usr/sbin/sshd -D
|
||||||
|
|
Loading…
Reference in a new issue