Reset ~/.ssh/ permissions

feature/repl
Rui Carmo 2016-09-10 00:12:49 +01:00 zatwierdzone przez GitHub
rodzic 9ea085cc70
commit 40a9b9a629
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -133,6 +133,7 @@ def setup_authorized_keys(ssh_fingerprint, script_path, pubkey):
# Restrict features and force all SSH commands to go through our script
with open(authorized_keys, 'a') as h:
h.write("""command="FINGERPRINT=%(ssh_fingerprint)s NAME=default %(script_path)s $SSH_ORIGINAL_COMMAND",no-agent-forwarding,no-user-rc,no-X11-forwarding,no-port-forwarding %(pubkey)s\n""" % locals())
os.chmod(dirname(authorized_keys), stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
os.chmod(authorized_keys, stat.S_IRUSR | stat.S_IWUSR)