Add file /etc/ssh/sshd_config
This commit is contained in:
parent
cfb4c0b763
commit
91e06c12cc
2
build.sh
2
build.sh
|
@ -162,6 +162,8 @@ on_chroot << EOF
|
||||||
apt-get install -y ssh
|
apt-get install -y ssh
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
apply_file 644 '/etc/ssh/sshd_config'
|
||||||
|
|
||||||
rm -fv "$ROOTFS_DIR/etc/ssh/ssh_host_key"
|
rm -fv "$ROOTFS_DIR/etc/ssh/ssh_host_key"
|
||||||
rm -fv "$ROOTFS_DIR/etc/ssh/ssh_host_key.pub"
|
rm -fv "$ROOTFS_DIR/etc/ssh/ssh_host_key.pub"
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
# See the sshd_config(5) manpage for details
|
||||||
|
|
||||||
|
Protocol 2
|
||||||
|
|
||||||
|
Port 22
|
||||||
|
AddressFamily inet
|
||||||
|
|
||||||
|
HostKey /etc/ssh/ssh_host_key
|
||||||
|
HostKey /etc/ssh/ssh_host_rsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_dsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||||
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||||
|
|
||||||
|
# Change to "no" after ssh-copy-id
|
||||||
|
PasswordAuthentication yes
|
||||||
|
|
||||||
|
PermitRootLogin no
|
||||||
|
ChallengeResponseAuthentication no
|
||||||
|
|
||||||
|
LoginGraceTime 120
|
||||||
|
TCPKeepAlive yes
|
||||||
|
|
||||||
|
PrintMotd no
|
||||||
|
PrintLastLog yes
|
||||||
|
|
||||||
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
Reference in New Issue