Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This may be a stupid question but can you obtain shell access to a web server by means of not forwarding any ports? I am at work and can't forward any ports to allow access. Are there alternatives?

EDIT: I need to SSH into my hostgator server in hopes to unpackage a large file so I don't need to manually upload everything. Our network is behind a Cisco router with individual software firewalls on the PC's. I don't think I am able to get port 2222 forwarded.

share|improve this question
1  
What do you mean with "shell access to a web server?" Do you need access to a web server (e.g. port 80)? Do you need shell access (say: ssh - port 22) to a system running a web server? Is the server running at home, e.g. behind a firewall/router? Please specify a little more. –  speakr Aug 7 '12 at 14:54
1  
Does this webserver have a public address? If so, then you can access it via ssh from anywhere (though that does not mean the router won't block access to it from external connections or your work router won't block outgoing ssh connections). If it is behind a router with NAT, then you will need to forward a port for external ssh connections to get to it. You should be able to get to it via ssh while on the same network. Can you better describe the geography of where you are compared to the webserver and the network it is on? what services does it have available for remote administration? –  MaQleod Aug 7 '12 at 15:01
    
I apologize - I've added the proper details to the original question. –  Jared Eitnier Aug 7 '12 at 15:01
    
Jared, I assume you're saying that you are behind the Cisco router with firewalls etc, and not the server? That shouldn't matter, as long as the server has a public address and is listening for ssh. –  Joseph Aug 7 '12 at 15:07
    
Joseph, that is correct. When I try to connect to the webserver the connection always times out. –  Jared Eitnier Aug 7 '12 at 15:08

1 Answer 1

Depending on how restrictive your local network is, you may be able to change the listening port of the SSH server to 80 or 443 and thereby fool the local network into thinking that you are communicating over those ports. But a stateful firewall will almost immediately catch those connections and block them, because SSH doesn't look like HTTP(S), so it will detect that you are sending SSH traffic over an HTTP port and block it.

Also, if you're behind an HTTP-only proxy or transparent (forced) HTTP proxy, then you can't get out on anything but HTTP.

If you are locked down in this way, then the best thing you can do is enable web based SSH access on the server by installing a package, or use a web service that does so (e.g. GoToMySSH). But in practice, many networks also block the most common web SSH providers, or block the technology they use (ActiveX or Java applets), or the connection is sufficiently logged and monitored that they'll block access to the remote server if they find out that you accessed a remote shell on it.

In short, playing cat and mouse with the network admins on a network that you don't control is pretty much a game of grasping at straws. If they want to prevent you from doing X and are investing a lot of time in preventing it, then they will ultimately succeed. But if you just have a simple router that isn't being monitored, you can probably succeed just by changing the listening ports.

That said, you won't be able to get into the system in the first place to change the ports or set up a web SSH console if you can't SSH into it. So you'll probably have to go home to a less restrictive connection first.

share|improve this answer
    
I think I'm stuck here, HostGator needs the ports to remain the same on shared hosting. I'll give you the answer though as logically it makes sense. Thanks! –  Jared Eitnier Aug 7 '12 at 16:18

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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