first commit
This commit is contained in:
8
files/miscscripts/ssh-config.txt
Executable file
8
files/miscscripts/ssh-config.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
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 ; \
|
||||
Reference in New Issue
Block a user