cannot establish a ssh connection using paramiko

Posted by sujiths80 on 2015-03-15 23:09
Forums: PyPM (discontinued) | OS: Windows 7

Hi,

I am trying a simple python program using paramiko. The program is as given below.

import paramiko
ssh = paramiko.SSHClient()
ssh.connect(' 10.126.74.198', username='test', password='test')

When I execute this program ,I am getting the error as given below.

C:\Python27>python.exe ssh.py
Traceback (most recent call last):
File "ssh.py", line 3, in
ssh.connect(' 10.126.74.198', username='test', password='test')
File "C:\Users\esujsom\AppData\Roaming\Python\Python27\site-packages\paramiko\
client.py", line 237, in connect
for (family, socktype, proto, canonname, sockaddr) in socket.getaddrinfo(hos
tname, port, socket.AF_UNSPEC, socket.SOCK_STREAM):
socket.gaierror: [Errno 11004] getaddrinfo failed

C:\Python27>

Kindly help me to fix this issue.

grahams
ActiveState Staff
Tue, 2015-03-17 10:50