The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
problem with remote execution of script using telnet sais Shell Programming and Scripting 1 02-04-2009 10:52 AM
Debian: New vnc4 packages fix remote code execution iBot Security Advisories (RSS) 0 02-02-2009 03:10 PM
Debian: New xterm packages fix remote code execution iBot Security Advisories (RSS) 0 01-02-2009 04:10 PM
remote execution pascalbout AIX 2 01-03-2006 06:20 AM
remote execution ragmelo Shell Programming and Scripting 5 04-10-2004 02:31 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-12-2009
uunniixx uunniixx is offline
Registered User
  
 

Join Date: May 2008
Posts: 29
Remote command execution

We have multiple Unix servers and a particular command can only be executed in one of the box from a specific path. I have password-less ssh set up for all the boxes. I am unsure the command to use to execute that particular command from any other box. To be specific say program named _my_exe_ can be executed fin Box A from a specific path. Now I am into Box B? What is the command I can use to start the _my_exe_ without leaving box B.

Thanks in advance.
  #2 (permalink)  
Old 03-12-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361

Code:
ssh BoxA "nohup _my_exe_ &"
  #3 (permalink)  
Old 03-14-2009
uunniixx uunniixx is offline
Registered User
  
 

Join Date: May 2008
Posts: 29
The option mentioned worked. Thanks.

I also in need to cd to a particular path after ssh before executing the command otherwise I am unable to specific operation. Something like:

ssh BoxA <cd go_to_dir> _my_exe_

Please suggest
  #4 (permalink)  
Old 03-14-2009
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,361

Code:
ssh BoxA "cd /wher/ever/you/like ; nohup _my_exe_ &"
  #5 (permalink)  
Old 04-02-2009
uunniixx uunniixx is offline
Registered User
  
 

Join Date: May 2008
Posts: 29
I am facing an issue and not able to resolve. The executable is invoked properly but in its initiation process it is now programmed to take (keyboard input) a password. So now I am experiencing executable getting hanged or stopped in-between or not behaving properly.

Can the ssh command be modified in a such a way that it can allow user to input something from keyboard for the remote executable being invoked. Please note that the executable cannot be modified.
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:01 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0