splitted in subscripts, cleaned

This commit is contained in:
Bachir Soussi Chiadmi
2018-04-07 11:15:09 +02:00
parent 9677df40ab
commit 0e81a4ab11
16 changed files with 695 additions and 629 deletions

21
bin/ssh.sh Normal file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
echo '\033[35m
__________ __ __
/ ___/ ___// / / /
\__ \\__ \/ /_/ /
___/ /__/ / __ /
/____/____/_/ /_/
\033[0m'
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
sed -i 's/PermitRootLogin\ yes/PermitRootLogin no/g' /etc/ssh/sshd_config
sed -i 's/PermitEmptyPasswords\ yes/PermitEmptyPasswords no/g' /etc/ssh/sshd_config
sed -i 's/Protocol\ [0-9]/Protocol 2/g' /etc/ssh/sshd_config
systemctl reload ssh
echo "\033[92;1mSSH secured\033[Om"