LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-24-2005, 08:15 AM   #1
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Rep: Reputation: 30
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?
 
Old 10-24-2005, 08:43 AM   #2
TruckStuff
Member
 
Registered: Apr 2002
Posts: 498

Rep: Reputation: 30
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.
 
Old 10-24-2005, 02:41 PM   #3
pippo
Member
 
Registered: Aug 2005
Distribution: Gentoo
Posts: 38

Rep: Reputation: 15
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.
 
Old 10-25-2005, 08:10 AM   #4
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Original Poster
Rep: Reputation: 30
Thanks . I definitely do.
 
Old 06-17-2009, 12:41 AM   #5
lunlun
Member
 
Registered: Jul 2005
Posts: 41

Rep: Reputation: 15
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!
 
Old 06-17-2009, 12:58 AM   #6
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
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
 
Old 06-17-2009, 10:39 AM   #7
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 274

Rep: Reputation: 51
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

Last edited by propofol; 06-17-2009 at 10:57 AM.
 
Old 06-20-2009, 06:59 AM   #8
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Original Poster
Rep: Reputation: 30
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.
 
Old 06-20-2009, 07:00 AM   #9
kamransoomro84
Member
 
Registered: Feb 2004
Location: Pakistan
Distribution: OpenSUSE 10.2
Posts: 241

Original Poster
Rep: Reputation: 30
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.
 
Old 06-22-2009, 11:32 PM   #10
propofol
Member
 
Registered: Nov 2007
Location: Seattle
Distribution: Debian Wheezy & Jessie; Ubuntu
Posts: 274

Rep: Reputation: 51
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh firewall sanjibgupta Linux - Security 1 09-23-2005 09:59 AM
SSH through a firewall 09kevin77 Linux - Security 13 06-04-2005 08:21 AM
ssh firewall jumbled Linux - Security 6 04-11-2005 09:01 AM
Ssh behind a firewall muneebs Linux - Newbie 3 02-03-2005 07:36 PM
SSH behind a firewall fedenini Linux - Networking 4 08-26-2004 11:57 AM


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

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration