LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-11-2005, 11:49 AM   #1
idahoakl
LQ Newbie
 
Registered: Feb 2005
Location: Idaho
Distribution: Fedora Core 5
Posts: 7

Rep: Reputation: 0
SSH on port 25 or 110


I am trying to SSH to my machine on our campus network. The only ports that I can see as open are 25 and 110 (smtp and pop3). I don't use smtp or pop3 on my linux box (mythtv only), is there a way that I can configure sshd to listen to port 25 or 110? I tried just changing it in sshd_config but haven't had any success. Is there anything special I have to do or is this just not possible?

Thanks

Matt
 
Old 11-11-2005, 12:21 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Port 25 is the "well known port" for telnet. You can probably run sshd there but need to make sure telnetd is disabled in inetd or xinetd so they don't both try to use that port. You probably don't want to use port 25 though since your average hacker is apt to try port 25 to see if telnet works.

Also you probably need to modify /etc/services so it knows which port you're using for sshd.

How do you know only 25 and 110 are open? If that's truly the case it suggests there is other traffic expected on those ports by your network admins and you're pushing ssh packets over it might cause them to come and talk to you. It would be better to try to convince them to open port 22 (the default for ssh) and explain the security benefits of ssh over telnet to them.
 
Old 11-11-2005, 03:27 PM   #3
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
If you change the "Port" setting in sshd_config then you can have the SSH daemon listening at whatever port you want.

When you changed the sshd_config did you restart the daemon ?
If not, then you need to restart it so that it can re-read its configuration.
If yes, then you probably have another daemon running on 25 (postfix,exim,sendmail,qmail etc)
BTW 25 = smtp and not telnet (23)
 
Old 11-12-2005, 07:53 AM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
BTW 25 = smtp and not telnet (23)
D'oh!

 
Old 11-12-2005, 02:14 PM   #5
idahoakl
LQ Newbie
 
Registered: Feb 2005
Location: Idaho
Distribution: Fedora Core 5
Posts: 7

Original Poster
Rep: Reputation: 0
Our campus network is setup in vlans so only certain traffic gets passed between vlans. I have my own router between my boxes and the rest of the campus network. I found out which ports were open by putting my linux box in the DMZ and then finding a computer on a different vlan and doing a port scan of it. It shows up that only 25 and 110 are open. I don't run a smtp server or a pop3 server so I don't need to have incoming traffic communicate on those ports. I don't even use smtp or pop3 to get email. Is there security implications of using one of these 2 ports and if so how do i go about locking them down so they can function like port 22?

Thanks for the responses btw

Matt
 
Old 11-12-2005, 04:04 PM   #6
imitheos
Member
 
Registered: May 2005
Location: Greece
Posts: 441

Rep: Reputation: 141Reputation: 141
Quote:
Originally posted by idahoakl
Our campus network is setup in vlans so only certain traffic gets passed between vlans. I have my own router between my boxes and the rest of the campus network. I found out which ports were open by putting my linux box in the DMZ and then finding a computer on a different vlan and doing a port scan of it. It shows up that only 25 and 110 are open. I don't run a smtp server or a pop3 server so I don't need to have incoming traffic communicate on those ports. I don't even use smtp or pop3 to get email. Is there security implications of using one of these 2 ports and if so how do i go about locking them down so they can function like port 22?

Thanks for the responses btw

Matt
The security problems come from the program itself not from the port that is running at, so if you run ssh in any other port than 22
there aren't any security implications.

I don't know how you can stop applications from running in Fedora. You can of course go to /etc/rcX.d and disable the script from there
but there are tools that do it for yourself (i think redhat had "chkconfig") do a "man chkconfig" maybe it is the same for fedora.

In order to see at which ports you have programs listening do "netstat -ntlp".
Then disable the pop3 daemon (if it is running) and change the SSH port from sshd_config
 
Old 11-12-2005, 05:45 PM   #7
guideweb
Member
 
Registered: Mar 2004
Location: /planet/earth
Posts: 110

Rep: Reputation: 15
Have you tryed with port over 50000 ? they are generaly opens
 
Old 11-13-2005, 08:58 AM   #8
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Fedora uses xinetd - you can check /etc/services to see what definitions exits for the ports then go to /etc/xinetd.d and see if the service there is turned on. Within the relevant xinetd.d file you will see a line regarding disabling the service. Just change that line to disable it if its enabled at present. You can then use the port for what you want.
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot telnet to port 110 Lostboys Linux - Newbie 11 04-19-2005 02:12 AM
telnet to site on port 110 mwmethe Linux - Networking 5 10-30-2004 09:43 AM
Turning off Firewall for Port 110? coffee9876 Linux - Security 1 10-14-2003 04:37 PM
port 110 isn't accepting connections member57 Linux - Networking 8 07-23-2003 09:11 PM
changing port 110 jonfa Linux - Networking 3 03-03-2002 03:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:11 AM.

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