I was given access to a university server, for which I have username, hostname, IP address and everything I'd need. I need to connect via ssh from my linux machine. From within the university network there was no problem in connecting but trying from home gives me some troubles. I get connection time-out error and I don't really know if I have to tunnel through some gateway or try something else. By now I tried with some basic instructions which I expected to work, such as:

ssh -D 9090 user@hostname

From what I understood, an alternative is that using the ssh -R option might help me if I set up a local gateway, but I'm not going anywhere.

Thank you in advance.


ssh: connect to host hostname port 22: Connection timed out

(Being the port the same that I used from within the campus, I don't think it should be a problem)

closed as off-topic by grawity, Olli, DrMoishe Pippik, karel, music2myear Mar 5 at 0:44

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Have you tried asking the university's IT team (and/or, specifically the people who gave you access to the server)? Whether you'll be able to connect from outside or not, whether you'll need a gateway/tunnel/VPN or not, is usually a decision they make. – grawity Mar 1 at 18:41
  • @Gee your university or department will need to give you VPN access. The specifics of that (are whether or not it is allowed) will be told to you by your department or university IT. – Christopher Hostage Mar 1 at 19:40

You may see a timeout if you're trying to connect to an SSH host within your own network. As mentioned by user248983, if you're trying to connect to an IP within private address space from your own home network(10.x.x.x or 192.168.x.x), you won't actually be hitting the Uni's host but just some other node in your network that likely doesn't exist and the connection will time out.

If you're actually using the IP address of the Uni's network, or its SSH host(and it's not a private address), you'll often see timeout messages when the connection is being blocked by a firewall on the host machine or on the network.

It's really unlikely that the SSH host on the University network would accept connections from everyone, anywhere since this allows for such a large attack vector should they ever be targeted. What's more likely is that you'll either be given access to some kind of gateway you can connect to from outside and/or you'll be required to give the IP address of your home network to the IT team so they can whitelist in the firewall.

In any case, this sounds like you should inquire more about remote access with the IT dept.

  • Thank you for your complete answer. You were right, I needed access to the university VPN. By now my question seems really stupid. – Gee Mar 26 at 12:59

If the ip address you were given is of the form 10.x.x.x or 192.168.x.x it is going to be necessary to use some tool to tunnel/vpn onto the university network, since these are reserved ip address ranges for local networks. Otherwise, I would check with the IT department that gave you access.

Not the answer you're looking for? Browse other questions tagged or ask your own question.