Operating System - HP-UX
1834457 Members
2712 Online
110067 Solutions
New Discussion

need to define port in /etc/services ?

 
SOLVED
Go to solution
Sammy_2
Super Advisor

need to define port in /etc/services ?

Do we need to define ports in /etc/services in order for app to use that port ? ssh which runs on port 22 is not defined in services file but it runs fine. Why ? I have sshd daemon running though.
Basically, what's the purpose of inetd.conf and /etc/services file?
Thanks
good judgement comes from experience and experience comes from bad judgement.
2 REPLIES 2
Pete Randall
Outstanding Contributor

Re: need to define port in /etc/services ?

/etc/services only *really* serves as documentation, as you've discovered.


Pete

Pete
Jeff Schussele
Honored Contributor
Solution

Re: need to define port in /etc/services ?

Hi Sam,

Short answer - No.

Inetd.conf defines the commands to be executed when a request comes in on a specific port. Only services under inetd's control are controlled in this manner. inetd is a daemon in & of itself that "controls" services defined in it's .conf file.

sshd is it's own daemon & defines for itself what port to monitor & hence does not need neither an entry in inetd.conf nor /etc/services.

HTH,
Jeff
/etc/services is just basically a lookup table to reference ports to services.
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!