9 lines
614 B
Plaintext
Executable File
9 lines
614 B
Plaintext
Executable File
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak ; \
|
|
sed -i "s,^#PermitRootLogin prohibit-password.*,PermitRootLogin no," /etc/ssh/sshd_config ; \
|
|
sed -i "s,^#PubkeyAuthentication yes.*,PubkeyAuthentication no," /etc/ssh/sshd_config ; \
|
|
sed -i "s,^#PasswordAuthentication yes.*,PasswordAuthentication yes," /etc/ssh/sshd_config ; \
|
|
echo "Match Address 192.168.1.*" >> /etc/ssh/sshd_config ; \
|
|
echo "Match Group sshusers" >> /etc/ssh/sshd_config ; \
|
|
echo "#AuthorizedKeysFile /etc/ssh/sshusers_authorized_keys" >> /etc/ssh/sshd_config ; \
|
|
touch /etc/ssh/sshusers_authorized_keys ; \
|