How to fix ssh connection timed out to ip with port 22

Anonymous
2023-07-04T08:32:46.5266667+00:00

I am not able to ssh to the server ip with port 22

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
11,408 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Limitless Technology 44,691 Reputation points
    2023-07-04T14:16:18.0766667+00:00

    Hello

    Thank you for your question and reaching out.

    1. Please check that the network allows SSH traffic over the port being used.
    2. Verify the firewall rules on both the client and server or Disable any Antivirus program or Windows firewall you may have for temporary purpose.
    3. Please increase the timeout value for the SSH command.

    --If the reply is helpful, please Upvote and Accept as answer--

    1 person found this answer helpful.
    0 comments No comments

  2. dagenihao 20 Reputation points
    2023-08-05T09:50:15.2233333+00:00

    I got a similar issue recently. Here are the summary of my case study. Hope it can give you some ideas.

    • Enable the verbose output in SSH command. ssh -vvvv ip Using the -vvv flag is helpful when troubleshooting SSH connection issues, as it provides a wealth of information that can help pinpoint the problem.
    • Check that the network allows SSH traffic over the port being used. Type the following command, replacing port_number with the port number being used for SSH: telnet server_address port_number
    • Check SSH service status: Ensure that the SSH server is running and accessible on the host you are trying to connect to. Log in to the host using an alternative method like remote desktop or console access, and check the SSH server’s status with the following systemctl command: systemctl status sshd

    reference :

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/troubleshoot-ssh-connection

    https://learn.microsoft.com/en-us/troubleshoot/azure/virtual-machines/detailed-troubleshoot-ssh-connection

    https://www.howtouselinux.com/post/ssh-connect-to-host-port-22-no-route-to-host

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.