Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test_ssh(host, username, password):
- ssh = paramiko.SSHClient()
- ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
- ssh.connect(host, username=username, password=password)
- ssh: Could not resolve hostname localhost: Name or service not known
- import socket
- socket.getaddrinfo('google.com', None)
- socket.getaddrinfo('localhost', None)
Add Comment
Please, Sign In to add comment