[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [suse-security] Execute a SSH command
> Hi Ingo,
> But sudo isn't to be used just in the local machine? I want to remotely
> execute a command, and the user should
> not have permissions to execute any other command, even if he has
> permissions on the remote to do so.
1) export public key to remote's machine (unsecure without password, but
easier to use)
2) add remotes public key to the machine
3) write a script as described on the list ... ssh -l xpto servername
'mycommand here | myothercommand'
4) if you desire root access for user xy then setup /etc/sudoers with
5) run the script e.g. as cron-job or whatever you desire.
I use this for remotely shutdown pc's connected to an usv (cheaper than
buying the apc-extension for two serial connectors).
It works fine to me, even if it's kind a insecure (look at 1) ... ).
Check the headers for your unsubscription address
For additional commands, e-mail: suse-security-help@xxxxxxxx
Security-related bug reports go to security@xxxxxxx, not here