1

I am in holiday in another country and trying to ssh on a server from my home country. I think the ISP here blocked that IP/class for various reasons. Is there a way I can bypass this ? I can ssh on any other machine without any problems (well, not from my home country, but still ...).

3
  • Which country are you in, right now? And to which country are you trying to connect? Aug 9, 2009 at 18:47
  • Does it matter? I am in Serbia, trying to reach Romania. Aug 9, 2009 at 19:06
  • Is there anyone you can call to configure anything on the remote server? I'm guessing no? If you can get some 'remote hands' then there may be some solutions. Aug 9, 2009 at 21:33

7 Answers 7

2

One suggestion (not an immediate fix unfortunately) would be to reconfigure your SSHD to listen on port 443. Then your client software will appear to any proxy and/or firewalls as HTTPS traffic instead of SSH traffic.

If you are forced to go through a proxy server than you can use an SSH client like WinSCP that supports connecting through a proxy server...

I wrote up an article about this topic that some might find useful...

2
  • Port 443 in particular works well because firewalls and proxy servers tend to let it through unmolested. Aug 20, 2009 at 17:38
  • The catch here is if a proxy server is between your client and server, and the proxy is performing SSL Bridging (SSL inspection). In this scenario the SSH traffic would probably be detected by the proxy server and terminated...
    – Dscoduc
    Aug 20, 2009 at 19:42
1

It seems like a proble with the firewall that reach your server. Have you tried to do a nmap to your server:

nmap -p 22 yourserver

I think that the result is going to be filtered or closed. One solution could be to establish a VPN to your office/datacenter and connect to your server as a local connection.

1
  • Yes, it's filtered, but I am pretty sure no one changed the firewall while I was gone. Also, on another ip, from the same class which has no firewall, I have the same problem. Aug 9, 2009 at 20:59
1

I don't know if you can get any 'remote hands' at the server to install and configure something for you, but I've used a solution called Hamachi to get around this sort of thing before.

Hamachi is a VPN service, however if you can't VPN to the other host for whatever reason (like, the IP is blocked), then the Hamachi servers will route and tunnel your request for you (at a limited speed however, but it's enough for SSH).

So, just as long as they haven't blocked the Hamachi servers, they will proxy your connection for you. Assuming you can get someone to install and configure it at the other end. Which I'm guessing you probably can't, or else you wouldn't be asking us here.

2
  • No, I can't at this hour. I can't even to see the sshd banner when telneting on 22. Isn't this a hint that it's not a firewall problem? If it were to be rejected the connection would have received at least the banner. Aug 9, 2009 at 21:43
  • If the IP is being blocked by the country you are in, then you wouldn't see anything at all, it would be as if the connection doesn't exist. Which is why a proxy to a 'safe' server outside the country is most likely the only option. Can you run a really long network cable into Croatia? (just kidding) Aug 9, 2009 at 21:49
0

As a temporary solution you can ssh to your server from another server you actually can ssh to.

2
  • Actually I tried that as well and it doesn't work either. I can ping the server tough. Aug 9, 2009 at 19:05
  • Try setting a VPN to somewhere and then connect. But personally I think that the ssh deamon isn't running or the sshd configuration permits only certain IPs. Try to do an NMAP scan and see if it discovers any ports, or if you have a http running try connect to it.
    – Alakdae
    Aug 10, 2009 at 7:44
0

Have you tried a connection outside Serbia?

If you can ssh a server outside Serbia you could simply use it as node to ssh your Romanian server. That could solve a problem of filtering outgoing connection.

An other option could be to find a way to set Romanian server's port 80 as ssh port, but you said you can ssh any other server...

2
  • Hi Andrea, I mentioned in Alakdae's comment that I can't ssh to my server even from another server outside Serbia. This might mean that's not a problem with the ISP here filtering packets, but with the romanian one ? Thanks! Aug 9, 2009 at 19:35
  • Yes it could mean that, or you could not have configured the remote box correctly. Aug 24, 2009 at 10:44
0

Without some way to get back to the console or have someone else you trust work on the system you may not have many options; you don't have VPN access to the network the machine is in...the only way to reconfigure it is to actually be back there.

When you do have access back there you can try reconfiguring the server to run SSHD on a different port then use -p to connect when outside your country again.

Also are you running anything like Denyhosts? Or firewalling the system? It's possible that it accidentally locked you out in that case. I've had that happen with denyhosts; I have to add my IP to a safelist in /etc/hosts.allow when that happens.

Either way you may be out of luck until you get a chance to return to your home area to do some reconfiguring.

0

The problem was with the ISP we're using. It seems that from time to time they have this kind of issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .