Changing SSH port

Hello,

Can anyone tell me how to change my SSH configuration to listen on another port (preferably 23)?

I want to connect to my home box from work via SSH, but my company's proxy blocks 22.  Telnet (23), web (80) and maybe some others I do not know about are allowed.

I want to use RSA authentication.  If I understand the SSH manpage, I need to keep the port number low.

I tried modifying 'sshd_config' and 'ssh_config' to no avail.

Any ideas?

Thanks in advance,
CubeDweller
cubedwellerAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
jlevieConnect With a Mentor Commented:
You can't do it by just changing SSH. Port 23 is already owned by telnet and ssh won't be able to listen on that port as long as inetd thinks it belongs to telnet. If you change inetd so that ssh will use 23 you'll prevent telnet from working on that system.

Why don't you try talking to the network administrators about enabling port 22 for ssh? They may have the others disabled for security reasons, but may not view ssh as being a significant risk.
0
 
karwoskiCommented:
If you're using SSH2 you can change the port number in the /etc/ssh2/ssh2_config file.  In that file there's a line:

Port      22

and you can change that to whatever you want. If you have SSH1 and you don't have a SSH subdir in /etc just poke around in /etc for a file name with something to the effect of sshconfig.
0
 
cubedwellerAuthor Commented:
Karwoski, thank you for your answer.

Jlevie is more correct though, since I had to disable telnet first to free up port 23.
0
 
cubedwellerAuthor Commented:
Thank you again, jlevie.
0
All Courses

From novice to tech pro — start learning today.