Commit 070ba3fc authored by Piotr "PHT" Jasiek's avatar Piotr "PHT" Jasiek

add test files

parent 1ff61b5c
#!/usr/bin/env python
import paramiko
hostname = "192.168.43.224"
password = "Koloseum1"
command = "uname -a"
username = "pi"
port = 22
client = paramiko.SSHClient()
client.load_system_host_keys()
client.set_missing_host_key_policy(paramiko.WarningPolicy())
try:
client.connect(hostname, port=port, username=username, password=password)
except paramiko.ssh_exception as e:
if "Unable to connect" in e.value:
print "trollo connect"
else:
print "chuj"
else:
stdin, stdout, stderr = client.exec_command(command)
print stdout.read()
client.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment