Yeah, that I know.  Once you have access to the machine and you have
super-user rights you can log on as root then shut down the machine.
But I was talking about how SSH allows you to log on, run the command
and then leave.  So you can perform tasks like:

ssh -l root <hostmachine> shutdown -r now

After you give your passwd, it will execute that command and then log
you off.  I don't *think* you can do that with telnet.  First of all you
can't telnet -l root <hostname>.  The server won't allow you to log on
as the super-user since telnet sends clear text passwd.  But I don't
think you could do a:

telnet -l <userID> <hostname> uptime

Then it logs on and issues that command to then log out.  As I look at
the telnet man pages, and attempt the above command, telnet thinks that
anything following the hostname is a port.  And there's no uptime port
on a machine that I know of! lol

[tdh@krypton ~]$telnet -l timh 152.160.8.96 uptime
uptime: bad port number

But there's nothing in there about being able to just log on, run a
command and then leave.  You have to log on, accept your envirnment, run
your command, and then manually log off.  As I mentioned with SSH you
can run a command like I did above:

[timh@r2d2 timh]$ ssh -l timh yoda uptime
timh@yoda's password:
  8:36am  up 55 days,  8:41,  4 users,  load average: 0.00, 0.00, 0.00

As you can see the machine's been up for 55 days, I didn't want to
reboot it!  So that's what I was referring to.  But you are correct.  If
you log onto the machine, then su to root, you can then issue the
shutdown command.

But as always, I give way too much information! :0)
tdh


T. Holmes
Unixtechs.org
[EMAIL PROTECTED]

"Real Men use Vi."


* Nadin Merali <[EMAIL PROTECTED]> [010409 21:29]:
| you can shutdown with telnet
| 
| log in as a user, su to root and then
| shutdown -r now

Reply via email to