1834625 Members
3288 Online
110069 Solutions
New Discussion

Telnet

 
vaman
Frequent Advisor

Telnet

earlier On a remote system (hpux 10.20)I was getting console by
telnet host_name 2001
I think 2001 was the port used for telnet, now I am not connecting connection, i am getting connection refused. what could be the reson?
vaman kulkarni
11 REPLIES 11
RAC_1
Honored Contributor

Re: Telnet

By default telnet uses port 21. If you were using telnet "host" 2001, may be the host was set to run telnet on port 2001.

Not all hosts run telnet on port 2001.
do telnet host

Anil
There is no substitute to HARDWORK
Sanjay_6
Honored Contributor

Re: Telnet

Hi,

The default port used by telnet is 23,

grep telnet /etc/services

Maybe the server on which you were trying to telnet using port 2001 was configured that way.

Normally you don't have to define the port, simply telnet host_name

Hope this helps.

regds
vaman
Frequent Advisor

Re: Telnet

host telnet gives same error
telnet: Unable to connect to remote host: Connection refused.
Actually the remote host I am trying with
telnet 2001
was working & i believe configured to work on port 2001,
As it was working earlier, stopped now can u see any resons
vaman kulkarni
Steven E. Protter
Exalted Contributor

Re: Telnet

telnet uses port 23 by default

You are trying to conect to port 2001 (yes you are correct).

The reason may be among the following:

1) No service is set up on 2001 in /etc/services

2) The daemon set up to server port 2001 may be down. /etc/services will give you an idea where to work.

3) A firewall or other network configuration may be blocking that port.

You may find more information in /var/adm/syslog/syslog.log

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sanjay_6
Honored Contributor

Re: Telnet

hi,

There could be any number of reasons why your telnet is not working.

Maybe telnet has been disabled. It is blocked by Firewall. Only certain ip subnets / hosts are allowed to do telnet.

Can you ping the server. Can you get console access. If you are not the primary admin for the server / speak to the primary admin.

Hope this helps.

Regds
Richard Darling
Trusted Contributor

Re: Telnet

HI Vaman,

Look for a line containing 2001/tcp in /etc/services. The name can be anything:

anyname 2001/tcp

In addition to that entry there needs to be a corresponding entry in /etc/inetd.conf:


anyname stream tcp nowait root /usr/lbin/telnetd telnetd


Bill Hassell
Honored Contributor

Re: Telnet

Is the remote system an HP-UX box? Or is it a mainframe or maybe a PC? There's really only a couple reasons for a connection refused message: someone changed your networking and is preventing your telnet request from getting through, or the remote system is no longer running a telnet service. Can any other machine connect to this remote system?


Bill Hassell, sysadmin
Sridhar Bhaskarla
Honored Contributor

Re: Telnet

Hi Vaman,

Most likely you are using a 'terminal server'. I have seen some of the terminal servers allow only one connection to each port. So, if you have already connected to that port in some other session, make sure you disconnect from it. This is one of the issues of using terminal servers. We have made it a practice here to let SAs logon to a single system and then telnet to the terminal server from there. That way, one can keep track of the connections.

Or check with the network group that is maintaining the terminal servers to force disconnect the port 2001.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
RATEFIARIVONY
Occasional Advisor

Re: Telnet

what if the telnet service was simply disabled from /etc/inetd.conf...
Popy
Regular Advisor

Re: Telnet

Hi Vaman,
There can be one simple reason, One can disable telnet sessions from any IP using /var/adm/inet.sec file.

In your case what is the entries in /var/adm/inet.sec ??

Raneesh
Bharat Katkar
Honored Contributor

Re: Telnet

Vaman,
I think shridhar has got your problem.
You must be using a digi box (terminal server) which has ethernet port connected to network and 8/16 serial port which connects to console ports of different servers. Now that first is 2001, 2nd is 2002 and so on (depends on what DG box u r using).

Now when you telnet, you must be doing an telnet to digi box and not the remote server directly. So if your remote servers console port is connected to port 1 ( 2001 ) then to get console you do:

# telnet 2001

If this is the case then the problem could be:

1. Port gone bad
2. Somebody pulled out the cable
3. Remote server now connected to different port
4. Somebody else logged in to that port

Hope that helps.
Regards,
You need to know a lot to actually know how little you know