Getting “socket.error: [Errno 61] Connection refused” python paramiko

The connection was refused by the server. This can be caused by several reasons not related to Python programming:

  • a firewall
  • the SSH service is configure not to take requests from your IP
  • bad host ip
  • … (many more)

Check if you can use the normal SSH client to connect with this host/user/password combination.

Leave a Comment