Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client = paramiko.SSHClient()
- client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- client.connect(hostname=host, port=int(port), username=username, password=password)
- stdin, stdout, stderr = ssh_client.exec_command(cmd, timeout=60)
- stdin.write("myrootpasswdn")
- stdin.flush()
Add Comment
Please, Sign In to add comment