[LUNI] Executing a command on another host?

Samir Faci sfaci at cs.uic.edu
Tue Jul 10 15:29:11 CDT 2007


in other words, something like this would work

ssh user at host1 "less -f /var/log/messages"

where you can replace the less command with whatever you'd need to execute



On 7/10/07, Michael Knoop <mknoop at uic.edu> wrote:
> If you execute ssh on one machine and end it with a command, ssh will
> execute that command on the remote machine instead of starting a login shell.
>
>
>       ssh [-1246AaCfgKkMNnqsTtVvXxY] [-b bind_address] [-c cipher_spec]
>           [-D [bind_address:]port] [-e escape_char] [-F configfile]
>           [-i identity_file] [-L [bind_address:]port:host:hostport]
>           [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
>           [-R [bind_address:]port:host:hostport] [-S ctl_path]
>           [-w local_tun[:remote_tun]] [user@]hostname [command]
>
>
> At 01:49 PM 7/10/07, you wrote:
> >Hello all,
> >
> >I have a program running that on one of the hosts on my small LAN that can
> >send SMS text messages from the command line.  I would like to be a able
> >to use it from other hosts on the LAN which amounts to somehow executing a
> >command from one host on to another. I believe I could write a script in
> >perl that perhaps uses rsync to help me do this but I feel like there must
> >someohow be an easier more effiecient way?  Does anyone no of any?
> >
> >Thanks,
> >
> >Richard
> >
> >
> >Your beliefs become your thoughts.  Your thoughts become your words.  Your
> >words become your actions.  Your actions become your habits.  Your habits
> >become your values.  Your values become your destiny.  -- Mahatma Gandhi
> >--
> >Linux Users Of Northern Illinois - Technical Discussion
> >http://luni.org/mailman/listinfo/luni
>
>
> --
> Linux Users Of Northern Illinois - Technical Discussion
> http://luni.org/mailman/listinfo/luni
>


More information about the luni mailing list