Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-17-2004, 07:53 AM   #1
LQ Newbie
Registered: Jul 2004
Posts: 6

Rep: Reputation: 0
Very easy method to add additional port for SSH?

Hi Guys!

Please suggest:

What is the simplest way to have SSH server listening on two ports 22 and say 8022?

In my opinion it can be implemented using port redirection
from port 8022 on external IP to port 22 on the same IP. Is it correct?
Note: We should be able to coninue using port 22.

But I do not know exact commands and utilities.
On windows it could be done using AnalogX or a proxy like wingate.

Thanks for your help
Old 07-17-2004, 08:07 AM   #2
LQ Newbie
Registered: Jul 2004
Posts: 6

Original Poster
Rep: Reputation: 0
I think it can be done using ipchains and ipportfw
but don't know exactly how
or may be there is an easier method ...
Old 07-17-2004, 09:25 AM   #3
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

Rep: Reputation: 50
edit your /etc/ssh/sshd_config

Port 8022


Old 07-17-2004, 12:23 PM   #4
LQ Newbie
Registered: Jul 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Should I use two lines like following:
Port 22
Port 8022
(or ListenAddress

Old 07-17-2004, 12:40 PM   #5
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 67
The 2 Port lines should be fine. There is no point in using Listen unless you only want to use specific NICs.
Old 07-17-2004, 02:26 PM   #6
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219

Rep: Reputation: 30

iptables -t nat -A PREROUTING -p tcp -d yourip --dport 8022 -j REDIRECT --to-port 22
Old 07-17-2004, 08:50 PM   #7
LQ Newbie
Registered: Jul 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you very much.

Last edited by aulix; 07-18-2004 at 11:10 PM.


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
Add additional checking edhan Linux - Newbie 9 06-11-2005 10:02 PM
How to add additional hard disc after installation osward Linux - Newbie 10 03-28-2004 06:01 PM
Add Additional Hard Drives rawdave Linux - Newbie 3 03-17-2004 09:47 AM
Best way to add additional window managers post setup ? Raptor Ramjet Slackware 3 12-27-2003 02:14 PM
RH8, would it be possible to add additional language support after installation? luoluotu Linux - Newbie 3 12-20-2002 05:11 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:47 PM.

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