LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   SSH behind firewall (http://www.linuxquestions.org/questions/linux-general-1/ssh-behind-firewall-376352/)

kamransoomro84 10-24-2005 08:15 AM

SSH behind firewall
 
Hi. I want to access a computer through SSH but the problem is, I'm behind a firewall that blocks SSH. Is there any way I can bypass it, say maybe a website that allows me to use SSH online?

TruckStuff 10-24-2005 08:43 AM

You could see if your admin will forward some other port to your box and have you SSHD listen on that port instead of 22.

pippo 10-24-2005 02:41 PM

So you would like to access a remote computer using ssh but the firewall you're has closed the ssh port...

You could use instead port 80 (http). This can be set in /etc/ssh_config. But the ssh server must also listen to that port. This can be set in /etc/sshd_config if you have some control aver the server.

kamransoomro84 10-25-2005 08:10 AM

Thanks :D. I definitely do.

lunlun 06-17-2009 12:41 AM

is there a disadvantage when we use port 80 as the ssh port?

would that jam the port?

confuse the port?

slow down the port?


Thanks!

JulianTosh 06-17-2009 12:58 AM

the only disadvantage is you'll potentially have some extra keys to type to specify the destination port everytime you ssh to the machine.

As long as you're not trying to run a web server on the same port, you can do it.

There will be no difference in speed by using a different port, unless some meanie is doing traffic shaping. But I am guessing any speed is greater than the nothing you're experiencing now. 8D

propofol 06-17-2009 10:39 AM

How about setting up a reverse ssh tunnel? http://www.linuxjournal.com/content/...re-tunnels-ssh but use port 80.

Your home pc would need to be set up so that ssh listens on port 80
/etc/ssh/sshd_config
Code:

# What ports, IPs and protocols we listen for
Port 80

Restart sshd.

On the firewall pc side:
Code:

ssh -TNR 4321:localhost:22 -p 80 userhomepc@home.ip
This may need a script which restarts it if the connection is reset / lost.

Home:
Code:

ssh -p 4321 userworkpc@localhost

Regards,
Stefan

kamransoomro84 06-20-2009 06:59 AM

Thanks. These suggestions are useful.

@propofol: I guess I was unclear. The firewall is on the client side, not on the server side. I'm not sure how they've configured it, but I can't ssh to my machine that has a public IP.

kamransoomro84 06-20-2009 07:00 AM

Thanks. These suggestions are useful.

@propofol: I guess I was unclear. The firewall is on the client side, not on the server side. I'm not sure how they've configured it, but I can't ssh to my machine that has a public IP.

propofol 06-22-2009 11:32 PM

I imagine the firewall is there for a reason, however I would think that tunneling ssh over an open port such as 80 or 21 (if ftp is allowed) might work. You could always forward port 80 on your router to your ssh server at home on whatever port it runs. I have not used it myself, but have you looked at:
corkscrew - tunnel TCP connections through HTTP proxies

If all else fails, there are also services like:
http://www.serfish.com/console/
There are some security implications with this.

Stefan


All times are GMT -5. The time now is 03:55 AM.