Advertisement
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=i, username=login, password=passw, port=port, timeout=1)
- stdin, stdout, stderr = client.exec_command('show ver')
- data = stdout.read().decode('utf-8') + stderr.read().decode('utf-8')
- print(data)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement