Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Change the default SSH server port on 10.3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Change the default SSH server port on 10.3
Authored by: AndyF on Jun 18, '04 03:34:34AM

As it's xinetd that's listening for connections, only it needs to be told a different port number. In addition to the line "port = 12345" (for whatever port number you want), you need to add the line "type = unlisted", otherwise xinetd will check the /etc/services file and make sure the port number matches. The error will show up in /var/log/system.log as "Service ssh expects port 22, not 12345".



[ Reply to This | # ]
Change the default SSH server port on 10.3
Authored by: deeno on Jul 23, '04 11:40:16AM

I used to run ssh on two port simultaneously. The standard port 22 and another one for convenience since many NetAdmins at my clients block port 22 (both inbound but more annoyingly outbound).

I copied /etc/xinetd.d/ssh to /etc/xinetd.d/sshXXX
changed its name, added a "-p XXX" and "port = XXX" and "type = unlisted"
did kill -HUP of xinetd
All is great, ssh on two ports.

Now my question: can I get xinetd to use the single file /etc/xinetd.d/ssh to use two ports? sshd with -p allows multiple ports. How do I tell this to xinetd?



[ Reply to This | # ]
Change the default SSH server port on 10.3
Authored by: DaveYost on Mar 26, '05 09:37:03PM

I tried this, and it didn't work for me on 10.3.8



[ Reply to This | # ]