Guest User

Untitled

a guest
Feb 20th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. def test_ssh(host, username, password):
  2. ssh = paramiko.SSHClient()
  3. ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
  4. ssh.connect(host, username=username, password=password)
  5.  
  6. ssh: Could not resolve hostname localhost: Name or service not known
  7.  
  8. import socket
  9. socket.getaddrinfo('google.com', None)
  10. socket.getaddrinfo('localhost', None)
Add Comment
Please, Sign In to add comment