diff --git a/src/yunohost/ssh.py b/src/yunohost/ssh.py index caac00050..ecee39f4a 100644 --- a/src/yunohost/ssh.py +++ b/src/yunohost/ssh.py @@ -64,6 +64,7 @@ def user_ssh_add_key(username, key, comment): parents=True, uid=user["uid"][0], ) + chmod(os.path.join(user["homeDirectory"][0], ".ssh"), 0o600) # create empty file to set good permissions write_to_file(authorized_keys_file, "")