blob: 7d37afd3355eec8dc762ba912c71671304581346 [file] [log] [blame]
#!/bin/bash
sed -re's/^#?PasswordAuthentication.*/PasswordAuthentication no/g' -i /etc/ssh/sshd_config
sed -re's/^#?ChallengeResponseAuthentication.*/ChallengeResponseAuthentication no/g' -i /etc/ssh/sshd_config
sed -re's/^#?PermitRootLogin.*/PermitRootLogin no/g' -i /etc/ssh/sshd_config
rm -f /etc/ssh/ssh_host_*
test -f /etc/ssh/ssh_host_dsa_key || dpkg-reconfigure openssh-server