5 lines
271 B
Plaintext
5 lines
271 B
Plaintext
# Allow ssh auth PubKey only.
|
|
sed --follow-symlinks -i 's/^\s*PubkeyAuthentication\s+no/PubkeyAuthentication yes/' /etc/ssh/sshd_config
|
|
sed --follow-symlinks -i '/^\s*PasswordAuthentication/d' /etc/ssh/sshd_config
|
|
echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config
|