Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

enable Telnet

Status
Not open for further replies.

gudguy

MIS
Nov 8, 2002
93
0
0
US
Hi,

My workstation is windows2k, but would like to telnet to Sun unix box. I couldn't telnet the box. The sun machine is on and is pingable.

How to enable telnet on Unix box so I can telnet from my workstation?

Thanks,
 
make sure telnet in enabled in /etc/services and /etc/inetd.conf

the inetd.conf entry looks like this on my solaris 8 box

telnet stream tcp6 nowait root /usr/sbin/in.telnetd in.telnetd

and under services the telnet entry is

telnet 23/tcp
 
A ping just means there's a route to the machine. It doesn't mean it's actually reachable. Pings go through things that other things sometimes can't. In other words, if you have a firewall between you and the machine you're trying to reach, a ping will usually go through, but telnet may be blocked. Your network admin should be able to give you more info.

Also, a traceroute (tracert on Win2k) should be able to tell you the path to the other machine. You can usually start tracking down your problems that way.
 
the telnet service on the UNIX system can also be configure to allow/deny IP ranges/subnets. They might only allow ssh connections to the UNIX box. Traceroute is a good tool to start with. What happens when you telnet to the UNIX box? does it hang, or do you get refused connection?

crowe
 
When I telnet it says connection failed.

btw, how do I enable telnet service? can anybody give me step-by-step procedure please? Thank you.
 
1. edit /etc/inetd.conf and make sure telnet isn't hashed out. if it doesn't exist put it in as per the example above

2. edit /etc/services and make sure a port is specified for telnet to run (as per the example above)

3. ps -ef | grep inetd. note the process ID.

4. kill -HUP whatever the process ID is.

should be good to go
 
I went to the machine to follow the above instructions. I saw the 'common desktop environment' console. I entered the ID: root and pwd. Then I followed the above instructions, but of no use. It says 'connect failed'. Should I restart any services?
 
you have to make sure the inetd process is running.

how it works is the file /etc/inetd.conf contains a list of services that can be invoked like ftp, telnet, samba services and so on. poke around with the file and make sure that telnet is there.

this file is used by the inetd process which allows you to run the services defined in the file. so do a ps -ef | grep inetd and you should see something like this ...

root 172 1 0 Nov 23 ? 0:00 /usr/sbin/inetd -s

then you need to check out /etc/services and make sure telnet has an available port to run out of. telnet should be tcp/23. make sure there isn't a # in front of telnet in any of these files.

once the files are modified and saved you need to restart the inetd process. you can either do this by going to /etc/init.d and running inetsvc stop then inetsvc start, or you can do a kill -HUP 172 (172 being the process ID of my inetd process shown above. yours will most likely be different)

from your win2k workstation you could always just pop a dos box and run telnet from there. START - RUN - CMD then at the prompt run telnet machinename

you have resolution set up yeah? try telnetting to the ip address if the machine name doesn't work. if this is the case then you have name resolution issues so you will be about to embark upon a crash course in dns :)


 
to enable root to telnet you must edit /etc/default/login and comment this line
CONSOLE=/dev/console
 
The network restriction points raised in this thread (a possible firewall or restrictions on which IPs can telnet in) can be checked by seeing if you can telnet to the Sun box from itself. i.e. login to the Sun box on the console and telnet to itself from there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top