资 源 简 介
sshsudo: ssh+sudo
Introduction
Usually it takes a system administrator three steps to run a command with root privilege on a remote computer:
ssh to a remote computer
sudo a command
exit
Alternatively, if a user script is to be executed with root privilege on the remote computer, it has to be copied there first. Therefore four steps are needed.
scp the script to the remote computer
ssh to the remote computer
sudo the script
exit
The authentication is required for almost every step. Thus a system administrator needs to type in his/her password two or three times for a single task.
There are some ways to save keystrokes when doing the remote administration. For example, sudo can be directly executed through ssh without login:
ssh foo@bar.net sudo ls -l
However, the system administrator stills needs to type in his/her password twice