LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-02-2004, 05:52 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
SSH to another port?


Hi,

I am behind a firewall that has the SSH default port 22 blocked. Is there anyway I can make SSH use another port to get out of the firewall I am behind?

Thanks alot,

>Craig
 
Old 06-02-2004, 06:11 PM   #2
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
You can use the "-p ##" option... But the computer you are sshing to needs to be listening on that port. And the firewall might be blocking everything but the standard web, mail, etc. ports.
 
Old 06-02-2004, 06:26 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Oh ok.

Cool thanks for the info. So in short, if I change the /etc/ssh_config file on the machine I am sshing to to listen to Port xx. And then use ssh -p xx to ssh from my local machine. It should be good?

Thanks alot for your help.

Regards,
Craig
 
Old 06-02-2004, 06:36 PM   #4
ranger_nemo
Senior Member
 
Registered: Feb 2003
Location: N'rn WI -- USA
Distribution: Kubuntu 8.04, ClarkConnect 4
Posts: 1,142

Rep: Reputation: 47
Thinking about it a bit more... It might be easier to forward the port you choose to port 22, all on the server you want to ssh to.

If you can ssh on port 2222, then on the remote computer, you would forward incoming port 2222 traffic to port 22. That would keep you from having to reconfig ssh, and thereby, ssh would still accept normal port 22 traffic, too.
 
Old 06-02-2004, 07:39 PM   #5
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Thanks for that. I got it working using the first method which is all I really wanted

Just one question. I did try to set the port to 2222 on the server side, and sshd wouldn't start up again.

I changed it to Port 92 and it worked. Is it possible for me to set the sshd port to listen to port 80 or 21 ?

Thanks again.
Craig
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh through port 80? acromi General 7 03-15-2009 04:01 PM
SSH over port 80 or 21 jeucken Linux - Networking 2 08-12-2004 12:03 PM
How to open the port 22 (ssh)? dicou Linux - Newbie 5 05-02-2004 01:12 PM
SSH Port Finlay Linux - Networking 4 06-09-2003 05:00 PM
SSH port fowarding magyartoth Linux - Networking 10 05-01-2002 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration