LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   run programs on a remote computer with script, how? (https://www.linuxquestions.org/questions/linux-networking-3/run-programs-on-a-remote-computer-with-script-how-69961/)

cmisip 07-03-2003 09:29 PM

run programs on a remote computer with script, how?
 
I know about ssh but I need a solution that will work independent of user input. Lets say I want to execute a shutdown -h now command on one of the computers on the network via a script from another computer in the network. How do I do this. ssh asks for a password. I figured out the sudo part to make it passwordless. Any ideas? Thanks

acid_kewpie 07-04-2003 05:50 AM

you can set up rexec to execute commands remotely from a known, trusted host automatically, you'd possibly want to do this through an ssh tunnel for security though.

for ssh authorisation automatically though, you'd need a dsa or rsa key pair setup for the particular host.

cmisip 07-06-2003 04:26 PM

Thank you very much
got it working with ssh pasword less login and its feature to execute a remote command.

Proud 07-06-2003 04:38 PM

Sorry, what?! You just let anyone in the world have the ability to remotely shutdown your pc?! :eek:

cmisip 07-06-2003 11:33 PM

I dont think so. It still uses DSA key. At least thats how I understand it works. The remote pc just has a copy of my public key.

Proud 07-07-2003 01:48 PM

Ok then, that sounds a bit saner. :)


All times are GMT -5. The time now is 05:07 PM.