how to chnage default ports on linux system
This is a discussion about how to chnage default ports on linux system in the Linux Networking category; 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.
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
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
Participate in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Jul 2
Sep 17
0
2 minutes
Responses to this topic
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.
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.
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.
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
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
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
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
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
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