Raspberry Pi SSH Absichern
W.I.P.
[ -f /var/lib/iptables ] && echo “File exist” || echo “-A INPUT -p tcp -m tcp –dport 1234 -j ACCEPT” | sudo tee -a /var/lib/iptables && mkdir ~/.ssh && nano ~/.ssh/authorized_keys
nun den zuvor generierten public authentication key einfügen und speichern
echo “Port 1234” | sudo tee -a /etc/ssh/sshd_config && echo “RSAAuthentication yes” | sudo tee -a /etc/ssh/sshd_config && echo “PubkeyAuthentication yes” | sudo tee -a /etc/ssh/sshd_config && echo “PasswordAuthentication no” | sudo tee -a /etc/ssh/sshd_config && sudo service network-manager restart && service ssh restart
Schreibe einen Kommentar