File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 6868sudo supervisorctl reread
6969sudo supervisorctl update
7070
71+ # harden ssh
72+ sudo tee ' /etc/ssh/sshd_config' > /dev/null << EOF
73+ Port 22
74+ Protocol 2
75+ HostKey /etc/ssh/ssh_host_rsa_key
76+ HostKey /etc/ssh/ssh_host_dsa_key
77+ HostKey /etc/ssh/ssh_host_ecdsa_key
78+ HostKey /etc/ssh/ssh_host_ed25519_key
79+ UsePrivilegeSeparation yes
80+ KeyRegenerationInterval 3600
81+ ServerKeyBits 1024
82+ SyslogFacility AUTH
83+ LogLevel INFO
84+ LoginGraceTime 120
85+ PermitRootLogin no
86+ StrictModes yes
87+ RSAAuthentication yes
88+ PubkeyAuthentication yes
89+ IgnoreRhosts yes
90+ RhostsRSAAuthentication no
91+ HostbasedAuthentication no
92+ PermitEmptyPasswords no
93+ ChallengeResponseAuthentication no
94+ PasswordAuthentication no
95+ X11Forwarding yes
96+ X11DisplayOffset 10
97+ PrintMotd no
98+ PrintLastLog yes
99+ TCPKeepAlive yes
100+ AcceptEnv LANG LC_*
101+ Subsystem sftp /usr/lib/openssh/sftp-server
102+ UsePAM no
103+ EOF
104+ sudo systemctl reload ssh
105+
71106# cleanup
72107sudo apt-get remove -y ${build_dependencies} > /dev/null
73108sudo apt-get autoremove -y > /dev/null
You can’t perform that action at this time.
0 commit comments