how to chnage default ports on linux system

Hi! SSH listen on port 22,but i want to change it to port 2222. does any forum member had done this earlier. pls. help me out. Rohit...




Topic Options
#2195 - 07/02/03 12:46 PM how to chnage default ports on linux system
rohit Offline
stranger

Registered: 07/02/03
Posts: 1
Hi!

SSH listen on port 22,but i want to change it to port 2222.
does any forum member had done this earlier.
pls. help me out.

Rohit

Top
Advertisement
#2219 - 07/04/03 03:58 PM Re: how to chnage default ports on linux system
Admiral LSD Offline
old hand

Registered: 08/14/01
Posts: 991
I don't know what version of SSH you're running or what distro you're running it on but I just had a look at a Debian box I have here and in /etc/ssh is a file called ssh_config and in said file is an option that I assume is to change the port SSH listens on. I can't say for sure but my best guess would be if you opened ssh_config, uncommented and changed that setting to read Port 2222, saved the file and then restarted the SSH daemon you'll get the result you want.

Top
#2510 - 08/01/03 08:16 AM Re: how to chnage default ports on linux system
twinsonas Offline
stranger

Registered: 08/01/03
Posts: 5
Quote:
Hi!

SSH listen on port 22,but i want to change it to port 2222.
does any forum member had done this earlier.
pls. help me out.

Rohit


yes. change the ssh configuration file to set new port then also edit /etc/services file in your linux box to enlist your ssh service to map to port 2222. You can simply copy the format for both tcp and udp lines.

Top
#2652 - 08/18/03 01:27 AM Re: how to chnage default ports on linux system
REL!c2K Offline
journeyman

Registered: 11/26/02
Posts: 95
Quote:
Quote:
Hi!

SSH listen on port 22,but i want to change it to port 2222.
does any forum member had done this earlier.
pls. help me out.

Rohit


yes. change the ssh configuration file to set new port then also edit /etc/services file in your linux box to enlist your ssh service to map to port 2222. You can simply copy the format for both tcp and udp lines.


Yep sound good smile

Top
#2877 - 09/17/03 01:11 PM Re: how to chnage default ports on linux system
mac24 Offline
stranger

Registered: 09/17/03
Posts: 2
I'm having a similar problem. My distribution is Smoothwall, but for whatever reason they've changed the default ssh port to 222, so as to keep 22 free, i'd like to change it back, but the /etc/services file has ssh on port 22, so how did they change it?

there is also no folder called /etc/shh, so i can't find ssh_config or anything similar. There is also no locate command, which is mighty frustrating...

any help would be appreciated, as I am a bit of linux newbie

Thanks

Marty

Top
#2878 - 09/17/03 02:25 PM Re: how to chnage default ports on linux system
mac24 Offline
stranger

Registered: 09/17/03
Posts: 2
Yeah i was a fool

i edited
/usr/local/etc/ssh_config
instead of
/usr/local/etc/sshd_config

and i wondered why it didn't change the port from 222 to 22 (yet when i ran sshd -p 22) it did change (albeit temporarily)

Laters

Marty

Top


Forums
Windows Support Forums
Everything New Technology
Legacy OS
Hardware
Software
Games
Networking
Customization & Tweaking
Security

Linux Support Forums
Everything Linux
Linux Hardware
Linux Software
Linux Games
Linux Networking
Linux Customization & Tweaking
Linux Security

Apple Support Forums
Everything Apple
Recent Topics
NEWBIE needs help with REALTEK
by SerryJW
Today at 06:09 AM
What version of Linux is this?
by DxxLinux
12/15/09 07:59 PM
Anything like HyperCam?
by Luckycharm8989
12/11/09 02:08 PM
Thank you for your help
by guaiguai
12/11/09 07:29 AM
What the problem is?
by guaiguai
12/11/09 05:09 AM
Who's Online
0 Registered (), 169 Guests and 37 Spiders online.
Key: Admin, Global Mod, Mod
Forum Stats
91352 Members
24 Forums
59054 Topics
189568 Posts

Max Online: 1079 @ 03/12/08 01:36 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22