Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

How to enable telnet in 10.2 UNIX
It is not recommended. Everyone should use SSH as it is secure. Telenet is not, and anyone monitoring your network traffic could grab your login/password. With that warning aside, sometimes you may have to use Telnet. To do that you need to do the following:
  1. Edit (as root) the inetd.conf file in /etc/ directory by typing sudo pico inetd.conf.
  2. Uncoment this line ...
    #telnet stream tcp nowait root /usr/libexec/tcpd    telnetd 
    ... by removing the # symbol at the start of the line.
  3. Save the file and quit pico.
  4. Restart inetd. To find the PID of inetd, type ps -aux | grep 'inetd'. Find a line in the output that looks like this ...
    root 410 0.0 0.0 1308 44 ?? Ss Wed01AM 0:00.00 inetd 
    
    ... then type sudo kill -9 410, where 410 is the PID as shown in the output above. Then run inetd again with the command sudo inetd. You could do this all at once by typing sudo kill -9 410; sudo inetd
If you want to bypass these steps after you have saved the changes to the inetd.conf file, just simply restart your machine.

That's it.
    •    
  • Currently 1.80 / 5
  You rated: 4 / 5 (5 votes cast)
 
[16,429 views]  

How to enable telnet in 10.2 | 14 comments | Create New Account
Click here to return to the 'How to enable telnet in 10.2' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
How to enable telnet in 10.2
Authored by: ybizeul on Aug 19, '03 10:48:42AM

There is a more modern way, by enabling it in xinetd
Just set disable to "no" in /etc/xinetd.d/telnet and re-launch xinetd (either by toggling ftp sharing in sharing system preference or "killall -USR2 xinetd" if it is already launched, or launch xinetd if it is not)



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: breen on Aug 19, '03 11:56:24AM

Re: restarting inetd

It's considered pretty crude (brute force, sledgehammerish) to restart a process by sending it a SIGKILL and then restarting it.

To make a process reread its configuration files you ordinarily send it a SIGHUP (numeric 1 if you're following at home).

To restart inetd I usually do this:

kill -HUP `cat /var/run/inetd.pid`

which accomplishes the job in one step.

Check 'man kill' for a list of signals in numeric and symbolic form.

Breen



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: MaxMouseroom on Aug 19, '03 03:32:27PM
This is even easier:

sudo killall -1 inetd


[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: Hes Nikke on Aug 20, '03 10:24:39AM
i can never remember the numbers so i would do a sudo killall -HUP inetd

---
vacuums do not suck. they merely provide an absence that allows other objects to take the place of what becomes absent.

[ Reply to This | # ]

Configuration File?
Authored by: rbest on Aug 19, '03 12:56:49PM

Does anyone know the name/location of the confiration file? I did a locate for 'telnet' but it didn't return anything that looked like it.

I'm CONSIDERING enabling telnet on a machine but like ssh, I only want it to accept logins from specific users.

Thanks!



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: eduo on Aug 19, '03 01:02:47PM

You shouldn't nowadays need to worry about PIDs except for some very specific situations. You can always do "killall -HUP inetd" and inetd should restart reloading its configuration files, which would effectively reload the changes and also avoid the possibility of error.

As a side note, killall takes the same arguments are kill, so you can kill a rogue app using the -9 switch if a normal killall doesn't work (I find myself doing killall -9 centericq frequently when using unstable builds). Killall also helpfully tells you when there are no more processes owned by you running (which kill -9 doesn't report).

eduo

---
Eduo



[ Reply to This | # ]
Finding the PID the Mac Way
Authored by: Wayne_S on Aug 19, '03 04:57:23PM

You could always fire up the Process Viewer (which I always keep in the Dock right next to the Terminal icon) and have it filter for processes owned by root if there are too many. The name sort usually works fine for me. Highlight the line listing inetd and the PID will be displayed in the bottom of the window. Not as UNIXy, but usually faster than scanning through terminal text.



[ Reply to This | # ]
telnet bad, ssh good
Authored by: macubergeek on Aug 19, '03 05:44:04PM

Why would anyone go out of their way to enable telnet which is insecure,when ssh already works, securely, with a click of a mouse button?



[ Reply to This | # ]
telnet bad, ssh good
Authored by: jollyroger on Aug 20, '03 11:48:15AM

That's easy. Some people need to access their machines remotely from within secure networks that do not allow ssh connections and only allow telnet access via proxy servers. This is a common situation in a corporate high-tech workplace environment.

I have my firewall on my home machine set up to drop all incoming telnet connections except ones from a specific host (the telnet proxy server I must go through) during certain work hours. It's not the most secure solution, but it's relatively secure and it sure beats nothing. = )

---
-monoclast



[ Reply to This | # ]
telnet bad, ssh good
Authored by: weevil on Aug 22, '03 10:17:54AM

For instance, the Newton has a telnet client but (unfortunately) not an SSH client. Rather than try to cram a bunch of software onto the Newton, it would be much cooler to telnet to a machine and use a bunch of Unix software remotely.



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: Anonymous on Aug 19, '03 05:50:35PM

Better yet,

sudo service telnet start

Look Ma, one line!



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: MaxMouseroom on Aug 20, '03 06:37:20PM

Please forgive my ignorance, but where is this "service" command documented? I can't find the man page.



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: bakedscrod on Aug 20, '03 09:18:59PM

It's a shell script. Open it in a text editor.



[ Reply to This | # ]
How to enable telnet in 10.2
Authored by: MaxMouseroom on Aug 21, '03 01:34:48AM

Doh!!! I should have considered that. Anyway, thanks!




[ Reply to This | # ]