TimeoutError: [Errno 60] Operation timed out (Python socket request)
I am fairly new to Python (just started today) but am really struggling with this:
#! /usr/bin/python
import socket
s=socket.socket()
s.connect(("", 22))
answer=s.recv(1024)
print(answer)
s.close
I believe I am meant to be getting some sort of 'banner' response but it gives nothing for a few minutes before spouting the following error: TimeoutError: [Errno 60] Operation timed out
Why would this be happening?