Operating System - HP-UX
1751880 Members
5310 Online
108783 Solutions
New Discussion

Cant telnet to my local host via port 514

 
Tyates27
Occasional Contributor

Cant telnet to my local host via port 514

Hi

I can not telnet to myself via port 514.  telnet to myself with out port 514 works fine.

telnet 'my ip address'  works

telnet 'my ip address' 514  gives Connection closed by foreigh host.

/etc/inetd.conf  has

telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd

/etc/serives has

shell 514/tcp cmd # remote command, no passwd used
syslog 514/udp # remote system logging

All help is appreciated.

Tom

2 REPLIES 2
Steven Schweda
Honored Contributor

Re: Cant telnet to my local host via port 514

> [...] my local host [...]

   What is it?

      uname -a

> I can not telnet to myself via port 514. telnet to myself with out
> port 514 works fine.

   Why did you expect that to work?  Telnet uses port 23; 514 is for
RSH, or, as HP called it, "remsh".  Hence "shell", not "telnet" for
514/TCP in your "/etc/services":

> shell 514/tcp cmd # remote command, no passwd used

> telnet 'my ip address' 514 gives Connection closed by foreigh host.

   Ok.  So something ("rshd"? "remshd"?) is listening at port 514, but
your Telnet client program is not negotiating a proper connection with
it.  And why should it? It's a _Telnet_ client program, not an
rsh/remsh client program.  (Telnet is good for a quick connection test,
but it's still only a _Telnet_ client program, not a Swiss-army-knife,
do-anything client program.)

   If _nothing_ had been listening at port 514, then you'd typically
have gotten an error like "connection refused".

   Does a command like the following work?:

      remsh 'my ip address'

   What, exactly, are you trying to do?  Is there some actual problem
which you are trying to solve?

   Note that all the old no-encryption services (Telnet, FTP, rsh/remsh,
rcp, and so on) are generally frowned upon these days.

Bill Hassell
Honored Contributor

Re: Cant telnet to my local host via port 514

You can change the port number for telnet in /etc/services.
If you want to use port 514, you have to disable remsh in /etc/inetd.conf
Then restart the telnetd program.
But then telnet coming from any other system will fail.

Perhaps you can describe why you want telnet to use the remsh port?



Bill Hassell, sysadmin