Telneting in to restart processes

paulboy

Chief Evangelist
I have a PC running win2k hooked on the same network with my OSX machine. How do I use telnet to restart processes if they are hung? What commands do I need to use and is it different using Win2k?

Thanks!
 
win2k should have a telnet program built in; use that to connect to your OSX box. Once you're connected, you aren't using win2k anymore, you're using OSX (well, darwin really) so the commands aren't any different than they would be in a OSX terminal window: ps -aux will get a list of running processes, kill -9 (pid) will kill the process with the pid you give it. I'm not sure if you can use the open command to launch a graphical app, but you could kill it, then relaunch it back at the OSX box.
 
Actually I was asking for more specific examples. Like, I type 'open' and the IP address of my Mac from my PC telnet. But it says connection failed. I have the remote login option checked on my X machine too. Is there some other way like typing the machine name? is so, what is the machine name? is it the user name?

Thanks
 
No, that is not the way to do things ;-)
Go to your, hmmm... "run" button, type "telnet ip-of-your-osx-box" and wait till you see the login prompt. Provide username and login and you'll inside your osx-box. And, no you won't have any graphical-windows or anything. No "open"-command. Nothing. Plain shell-commands will do. I.e.: "ps auxw" "ls" ...

cu:Stray
 
Doesn't seem to work. What am I doing wrong?

At the run button I typed exactly

telnet ip 201.36.65.1 (fake IP)

a window opened than, closed. NOthing happened.
 
IIRC the version 10.0.1 of MacOSX came with ssh. Since then telnet is disabled, but you can login via ssh.
Get the nice littele app "Putty" for Windows (Freeware) and try it with ssh. This should work.

cu:Stray
 
yes, telnet is not turned on in OS X but you can turn it on...if you really want to.

ssh is a much more secure way to go about it, but for the telnet people you can tunr it on by editing /etc/inetd.conf

remove the # from the line that looks like this and restart

#telnet stream tcp nowait root /usr/libexec/tcpd telnetd

loggin out and the logging back in make work to restart initd too....

-jason
 
Yes! It works with SSH. 10.0.4 did indeed disable telnet access. SSH login works like a charm.
 
although Putty is a nice app - a neater alternative would be if you're running Apache (especially with HTTPS) to install this Java SSH applet onto a webpage on your box:

http://www.appgate.org/products/mindterm/


then you're limited to just having a Java enabled web browser and you can SSH from almost anywhere...
 
Back
Top