LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 07-17-2004, 07:53 AM   #1
aulix
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
aulix
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
ppuru
Senior Member
 
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791

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

Port 8022

and/or

ListenAddress 172.31.200.10:22
 
Old 07-17-2004, 12:23 PM   #4
aulix
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 172.31.200.10:22
ListenAddress 172.31.200.10:8022)
?

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

Rep: Reputation: 64
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
newpenguin
Member
 
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219

Rep: Reputation: 30
otherwise

iptables -t nat -A PREROUTING -p tcp -d yourip --dport 8022 -j REDIRECT --to-port 22
 
Old 07-17-2004, 08:50 PM   #7
aulix
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.
 
  


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
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


All times are GMT -5. The time now is 12:51 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