Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Commit

Permalink
Send ping after patch. Add all available patch names.
Browse files Browse the repository at this point in the history
  • Loading branch information
a-martynovich committed Feb 26, 2020
1 parent 702cb61 commit 881c666
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion agent/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ def main():
}

patches = {
'openssh-password-auth': 'Disable password authentication'
'openssh-empty-password': 'OpenSSH: Disable logins with empty password',
'openssh-root-login': 'OpenSSH: Disable root login',
'openssh-password-auth': 'OpenSSH: Disable password authentication',
'openssh-agent-forwarding': 'OpenSSH: Disable agent forwarding',
'openssh-protocol': '\tOpenSSH: Force protocol version 2'
}
patch_help_string = "One of the following:\n" + "\n".join(
["{}\t{}".format(k, v) for k, v in patches.items()])
Expand Down Expand Up @@ -70,6 +74,7 @@ def main():
run_daemon(dev=args.dev)
elif args.action == 'patch':
patch(args.patch_name, dev=args.dev)
run(ping=True, dev=args.dev)
else:
run(ping=False, dev=args.dev)
print(actions[args.action][0](dev=args.dev))
Expand Down

0 comments on commit 881c666

Please sign in to comment.