Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import paramiko
- client = paramiko.SSHClient()
- client.load_system_host_keys()
- client.set_missing_host_key_policy(paramiko.WarningPolicy())
- server_add = "127.0.0.1"
- username = "yyy"
- password = "xxx"
- client.connect(server_add, port=22, username= username, password= password)
- stdin, stdout, stderr = client.exec_command("ls")
- print stdout.read()
Add Comment
Please, Sign In to add comment