[Python] TimeoutError: [Errno 60] Operation timed out (Python socket request)

Discussão em 'Python' iniciado por Stack, Fevereiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    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(("<my ip addres>", 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?

    Continue reading...

Compartilhe esta Página