Solved

Changing SSH port

Posted on 2000-03-06
4
262 Views
Last Modified: 2013-12-16
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
0
Comment
Question by:cubedweller
  • 2
4 Comments
 

Expert Comment

by:karwoski
Comment Utility
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
 
LVL 40

Accepted Solution

by:
jlevie earned 50 total points
Comment Utility
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
 

Author Comment

by:cubedweller
Comment Utility
Karwoski, thank you for your answer.

Jlevie is more correct though, since I had to disable telnet first to free up port 23.
0
 

Author Comment

by:cubedweller
Comment Utility
Thank you again, jlevie.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now