Re: Send commands to remote machine with 'do shell script'
Re: Send commands to remote machine with 'do shell script'
- Subject: Re: Send commands to remote machine with 'do shell script'
- From: Axel Luttgens <email@hidden>
- Date: Tue, 29 Jul 2008 12:05:58 +0200
Le 29 juil. 08 à 11:51, Alan Fairlie a écrit :
I have setup ssh to login in without asking for a password with dsa
keys.
Now I want to send commands to the remote machine.
I have tried the following.
do shell script "ssh user@address ; ps"
But the 'ps' returns processes for the local machine.
Hello Alan,
In the shell process spawned by "do shell script", you are executing
two commands in turn: "ssh", then "ps".
You should pass the command to be run on the remote box as an argument
to the ssh command:
do shell script "ssh user@address ps"
Yeah, one char matters... ;-)
But I guess you would have to pass some arguments to ps as well, for
example:
do shell script "ssh user@address ps -ax"
depending on the processes you are interested in.
HTH,
Axel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden