openssh - run as another user

Coy Hile Coy.Hile at COYHILE.COM
Fri Aug 27 12:39:05 EST 2010


Use sudo a la

ssh desthost sudo /some/command

-----Original Message-----
From: openssh-unix-dev-bounces+coy.hile=coyhile.com at mindrot.org [mailto:openssh-unix-dev-bounces+coy.hile=coyhile.com at mindrot.org] On Behalf Of Phillip Wu
Sent: Thursday, August 26, 2010 7:37 PM
To: openssh-unix-dev at mindrot.org
Subject: openssh - run as another user

For security, many systems are configured so you cannot log directly as root via the initial authentication in openssh.

What is usually done is that you log onto as your normal login and once you get a interactive shell you su to root to
run the command that requires root.

Does openssh have a more elegant way of exec'ing a command as root so I can run the command
non-interactively?  I know:
Normal userid
Normal userid password
Root's password

***************************************************************
This message is intended for the addressee named and may contain confidential information. If you are not the intended recipient, please delete it and notify the sender. Views expressed in this message are those of the individual sender, and are not necessarily the views of the Land and Property Management Authority. This email message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************
Please consider the environment before printing this email.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev at mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev


More information about the openssh-unix-dev mailing list