Guest User

Untitled

a guest
Dec 20th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. import paramiko as pk
  2. ssh = pk.SSHClient()
  3. ssh.set_missing_host_key_policy(pk.AutoAddPolicy())
  4. ssh.connect("hostname", username="username", password="**********")
  5. stdin, stdout, stderr = ssh.exec_command("cd my_path ; ./my_script.sh",) # Пробовал с get_pty=True
  6. print stdout.read().decode()
Add Comment
Please, Sign In to add comment