Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo "7. Configuring SSH"
- echo "Host *" >> /etc/ssh/ssh_config
- /usr/bin/awk '/^Protocol/ { $2 = "2"};
- /^X11Forwarding/ { $2 = "no"};
- /^#MaxAuthTries/ { $1 = "MaxAuthTries" ; $2 = "3"};
- /^#IgnoreRhosts/ { $1 = "IgnoreRhosts" ; $2 = "yes"};
- /^#RhostsRSAAuthentication/ { $1 = "RhostsRSAAuthentication" ; $2 = "no"};
- /^#LoginGraceTime/ { $1 = "LoginGraceTime" ; $2 = "0m"};
- /^#PermitRootLogin/ { $1 = "PermitRootLogin" ; $2 = "yes"};
- /^#PermitEmptyPasswords/ { $1 = "PermitEmptyPasswords" ; $2 = "no"};
- /^#Banner/ { $1 = "Banner" ; $2 = "yes"};
- {print}' /etc/ssh/sshd_config > /etc/ssh/sshd_config.new
- cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
- /usr/bin/mv /etc/ssh/sshd_config.new /etc/ssh/sshd_config
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement