Created
January 10, 2018 10:53
-
-
Save sergiomario/32c0b615011c3ba5bc96aceb172ec3be to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API = { | |
'login': BASE_URL+'/api/v1/system/login', | |
'service_ssh': BASE_URL+'/api/v1/service/ssh', | |
} | |
def ssh_config(enabled=True, port=22, wan_access=True): | |
data = {'data': {'enabled': enabled, 'port': port, 'wan_access': wan_access}} | |
requests.put(API['service_ssh'], data=json.dumps(data), | |
headers=headers, verify=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment