droplets: Disable SSH password authentication.

We cannot disable this in base droplet as DigitalOcean overrides
the file and enable password authentication during droplet creation.
This commit is contained in:
Vishnu Ks
2020-05-06 20:17:35 +05:30
committed by Tim Abbott
parent 4796206629
commit 2bd0e59462

View File

@@ -124,6 +124,8 @@ def set_user_data(username: str, userkey_dicts: List[Dict[str, Any]]) -> str:
{setup_zulipdev_ssh_keys} {setup_zulipdev_ssh_keys}
{setup_root_ssh_keys} {setup_root_ssh_keys}
sed -i "s/PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config
service ssh restart
{hostname_setup} {hostname_setup}
su -c '{server_repo_setup}' zulipdev su -c '{server_repo_setup}' zulipdev
su -c '{python_api_repo_setup}' zulipdev su -c '{python_api_repo_setup}' zulipdev