From 2bd0e59462a0a9b443f16db14e28f0f6ba3a6106 Mon Sep 17 00:00:00 2001 From: Vishnu Ks Date: Wed, 6 May 2020 20:17:35 +0530 Subject: [PATCH] droplets: Disable SSH password authentication. We cannot disable this in base droplet as DigitalOcean overrides the file and enable password authentication during droplet creation. --- tools/droplets/create.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/droplets/create.py b/tools/droplets/create.py index f5e2ec8f4a..3e7c868b3e 100644 --- a/tools/droplets/create.py +++ b/tools/droplets/create.py @@ -124,6 +124,8 @@ def set_user_data(username: str, userkey_dicts: List[Dict[str, Any]]) -> str: {setup_zulipdev_ssh_keys} {setup_root_ssh_keys} +sed -i "s/PasswordAuthentication yes/PasswordAuthentication no/g" /etc/ssh/sshd_config +service ssh restart {hostname_setup} su -c '{server_repo_setup}' zulipdev su -c '{python_api_repo_setup}' zulipdev