Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- try:
- ssh.connect(hostname = "10.10.10.5", port = "22", username = 'root', password = 'jonathan123')
- except:
- print 23
- cmd = raw_input("cmd > ")
- stdin, stdout, stderr = ssh.exec_command("ls")
- print stdout.readlines()
Add Comment
Please, Sign In to add comment