From 91e06c12cc7779d3533be32a79aa1150e1692bba Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Mon, 30 Oct 2017 14:08:19 +0000 Subject: [PATCH] Add file /etc/ssh/sshd_config --- build.sh | 2 ++ files/etc/ssh/sshd_config | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 files/etc/ssh/sshd_config diff --git a/build.sh b/build.sh index 0e28109..47aca72 100644 --- a/build.sh +++ b/build.sh @@ -162,6 +162,8 @@ on_chroot << EOF apt-get install -y ssh 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.pub" diff --git a/files/etc/ssh/sshd_config b/files/etc/ssh/sshd_config new file mode 100644 index 0000000..13aaa2c --- /dev/null +++ b/files/etc/ssh/sshd_config @@ -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