fuel-library/deployment/puppet/cobbler/templates/snippets/sshd_auth_pubkey_only.erb
2013-07-22 19:18:41 +04:00

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