SSH connection timed out. it's not client or server...what now?

26,309

You can use traceroute for this, with the options -T for TCP and -p 22 to specify the SSH port. When using these options, you need to run traceroute as root:

 sudo traceroute -p 22 -T sshserver.example.com
Share:
26,309

Related videos on Youtube

mitchell_cj
Author by

mitchell_cj

total geek

Updated on September 18, 2022

Comments

  • mitchell_cj
    mitchell_cj over 1 year

    I have been using a Linux server via SSH for months, it still works from other locations but for some reason, this week, it isn't working from the office.

    Putty says "Connection timed out"

    Is there a way to determine where the problem is? Can i trace route on port 22 or something like that?

    Just to clarify. I can SSH to my home Linux box, then SSH to the server. I just can't SSH to the server from work. I have contacted the host and I'm not blocked or blacklisted or anything like that.

    • Thorsten Staerk
      Thorsten Staerk over 10 years
      Need more input. You want to connect from your Windows computer at work to your Linux server in the internet? Can it be that you are behind a corporate firewall?
    • mitchell_cj
      mitchell_cj over 10 years
      Thanks for the reply, There is a firewall (smoothwall) which has outbound port 22 allowed. I can access my home SSH server but not our work server (hosted). If only i could put -trace on the SSH command so i could see where my connection is failing...that would be super dooper. Tested in the office on Windows8, Debian & MacOSX.
    • SHW
      SHW over 10 years
      Have you seen the server side SSHD log file ? Paste here, if you can.
    • Thorsten Staerk
      Thorsten Staerk over 10 years
      if you cannot connect to the server - can you ping it?
    • S edwards
      S edwards over 10 years
      your internet box has been updated and suppress existing NAT ? your company put a firewall and restrict the use of port 22 ? that's just thoughts
    • slm
      slm over 10 years
      This sounds very much like a routing issue where the subnet you're PC is on is unable to access the subnet that this box is on.
  • mitchell_cj
    mitchell_cj over 10 years
    Thankyou, i didn't see the option for port in the traceroute docs.
  • mitchell_cj
    mitchell_cj over 10 years
    Problem ended up being smoothwall, some clown had put a rule "enable SSH" which should have read "disable SSH".