The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Cut command on a remote machine using rsh eamani_sun Shell Programming and Scripting 1 06-04-2008 06:33 PM
Command to set locale for my linux machine eamani_sun Linux 1 05-16-2008 02:04 PM
Execute command from terminal on remote machine Ranu Shell Programming and Scripting 0 10-09-2007 01:13 AM
what is the Command used to check Connected tape Drive is detected by HP UX machine sunanda HP-UX 5 08-08-2007 01:46 AM
command to know disk controllers in a machine reply2priyanka UNIX for Dummies Questions & Answers 3 04-19-2005 04:58 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-10-2008
Registered User
 

Join Date: Apr 2008
Location: bangalore
Posts: 41
how to run a command in different machine using SSH

how to run a command in different machie

in my case script will runs in solaries machine..
in one instance it has to run a command in different machine with different operating system ( linux ) using SSH command

i tried

ssh -l (login_name) (machine name/host ) " command "

but it is not working

is there any enviroment set i need to do ?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-10-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,111
That's how it's supposed to work. What exactly did you try, and how did it fail?

Code:
vnix$ ssh elsewhere echo moo
moo
Reply With Quote
  #3 (permalink)  
Old 04-10-2008
Registered User
 

Join Date: Apr 2008
Location: bangalore
Posts: 41
tied from solaries

ssh -l user1 h3287xmf "command"

any environment have to set for that ..?

since it is from solaries to linux ?
Reply With Quote
  #4 (permalink)  
Old 04-10-2008
era era is offline
Herder of Useless Cats
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,111
And it failed ... how?

If you get error messages and don't post them here, you are wasting time.

The double quotes are not necessary unless you need to protect something in the command line from the local shell.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 10:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0