Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 03-28-2004, 04:38 PM   #1
Registered: Mar 2004
Posts: 30

Rep: Reputation: 15
Able to change port number between telnet and ssh?

My company block all ports but 23(telnet) and 21(ftp).
However, i want to use ssh to connect to my web server.

This is some of the settings in /etc/services
ssh             22/tcp                          # SSH Remote Login Protocol
ssh             22/udp                          # SSH Remote Login Protocol
telnet          23/tcp
telnet          23/udp
I have tried to change ssh to use 23 and telnet to use 22 but failed.

Any idea?
Old 03-28-2004, 04:41 PM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 246Reputation: 246Reputation: 246
Well don't even bother using telnet to your server. Just configure ssh on your server to listen on port 23 instead of 22..

And when you connect from work, it should allow you to pass thru the firewall with no problems. And the services file is just a listing, check your ssh_config in /etc/ssh/ to change the port, restart it, etc.
Old 03-28-2004, 04:49 PM   #3
Registered: Mar 2004
Posts: 30

Original Poster
Rep: Reputation: 15
i found the content in /etc/ssh/ssh_config are all commented out

# Site-wide defaults for various options

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsAuthentication no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   BatchMode no
#   CheckHostIP yes
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
#   Protocol 2,1
#   Cipher 3des
So, i un-comment out Port 22 and change to 23?
Old 03-28-2004, 05:04 PM   #4
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 246Reputation: 246Reputation: 246
Acutally.. sorry, check your sshd_config for the server port settings. I think the ssh_config is when your ssh'ing from that machine to another, etc for default settings. sshd_config should be for the sshd daemon.
And yeah, you should find the port setting there, change to 23 and restart sshd. Then when you connect from work, it should connect using port 23 by default.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PLESK [Solution] Change port to 23 (telnet) instead of default port 8443 x5452 Linux - Software 6 05-10-2009 05:58 AM
Change ssh port number israel Linux - Software 2 08-30-2006 05:18 AM
How to change Exim port number? ylikone Linux - Software 2 06-26-2005 12:33 PM
Change SSH Port? flamesrock Linux - Software 6 10-02-2004 07:12 PM
Change Telnet Port acbenny Linux - Networking 2 07-22-2004 08:05 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration