LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-03-2003, 09:29 PM   #1
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
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
 
Old 07-04-2003, 05:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
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.
 
Old 07-06-2003, 04:26 PM   #3
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Thank you very much
got it working with ssh pasword less login and its feature to execute a remote command.
 
Old 07-06-2003, 04:38 PM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Sorry, what?! You just let anyone in the world have the ability to remotely shutdown your pc?!
 
Old 07-06-2003, 11:33 PM   #5
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
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.
 
Old 07-07-2003, 01:48 PM   #6
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Ok then, that sounds a bit saner.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can't run X programs on remote linux box haora Linux - Newbie 5 08-28-2006 08:08 AM
How can I get the computer to boot up and run a program/game w/ bash script or C++? DaMan101 Programming 5 04-11-2004 03:22 PM
How can I get the computer to boot up and run a program/game w/ bash script or C++? DaMan101 Linux From Scratch 1 04-10-2004 12:23 AM
shell script beginer run programs spoody_goon Programming 2 03-27-2004 07:12 PM
on Network Up Script run? On Battery power run script? v2-ncl Linux - General 0 12-08-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration