ssh server connect to host xxx port 22: Connection timed out on linux-ubuntu

前端 未结 10 1309
有刺的猬
有刺的猬 2020-12-17 20:04

I am trying to connect to remote server via ssh but getting connection timeout.

I ran the following command

ssh testkamer@test.dommainname.com

相关标签:
10条回答
  • 2020-12-17 20:26

    I had this error when trying to SSH into my Raspberry pi from my MBP via bash terminal. My RPI was connected to the network via wifi/wlan0 and this IP had been changed upon restart by my routers DHCP.

    Check IP being used to login via SSH is correct. Re-check IP of device being SSH'd into (in my case the RPI), which can be checked using hostname -I

    Confirm/amend SSH login credentials on "guest" device (in my case the MBP) and it worked fine in my attempt.

    0 讨论(0)
  • 2020-12-17 20:33

    Here are a couple of things that could be preventing you from connecting to your Linode instance:

    1. DNS problem: if the computer that you're using to connect to your remote server isn't resolving test.kameronderdehamer.nl properly then you won't be able to reach your host. Try to connect using the public IP address assigned to your Linode and see if it works (e.g. ssh user@123.123.123.123). If you can connect using the public IP but not using the hostname that would confirm that you're having some problem with domain name resolution.

    2. Network issues: there might be some network issues preventing you from establishing a connection to your server. For example, there may be a misconfigured router in the path between you and your host, or you may be experiencing packet loss. While this is not frequent, it has happenned to me several times with Linode and can be very annoying. It could be a good idea to check this just in case. You can have a look at Diagnosing network issues with MTR (from the Linode library).

    0 讨论(0)
  • 2020-12-17 20:38

    My VPN connection was not enabled. I was trying all possible way to open up the Firwall and Ports until I realized, I am working from home and my VPN connection was down. But yes, Firewall and ssh configurations can be a reason.

    0 讨论(0)
  • 2020-12-17 20:42

    There can be many possible reasons for this failure.

    Some are listed above. I faced the same issue, it is very hard to find the root cause of the failure.

    I will recommend you to check the session timeout for shh from ssh_config file. Try to increase the session timeout and see if it fails again

    0 讨论(0)
  • 2020-12-17 20:43

    If you are on Public Network, Firewall will block all incoming connections by default. check your firewall settings or use private network to SSL

    0 讨论(0)
  • 2020-12-17 20:43

    I faced a similar issue. I checked for the below:

    1. if ssh is not installed on your machine, you will have to install it firstly. (You will get a message saying ssh is not recognized as a command).
    2. Port 22 is open or not on the server you are trying to ssh.
    3. If the control of remote server is in your hands and you have permissions, try to disable firewall on it.
    4. Try to ssh again.

    If port is not an issue then you would have to check for firewall settings as it is the one that is blocking your connection.

    For me too it was a firewall issue between my machine and remote server.I disabled the firewall on the remote server and I was able to make a connection using ssh.

    0 讨论(0)
提交回复
热议问题