![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Executing a script through GUI | snvijaysankar | UNIX for Dummies Questions & Answers | 2 | 06-02-2008 01:49 AM |
| Remotely executing awk command | bishweshwar | Shell Programming and Scripting | 1 | 07-14-2007 02:20 PM |
| How to remotely execute a script (.COM ) on a VMS system ? | ivancleber | Shell Programming and Scripting | 1 | 07-27-2006 05:44 AM |
| How to remotely execute a script (.COM ) on a VMS system ? | ivancleber | UNIX for Advanced & Expert Users | 1 | 07-26-2006 12:01 PM |
| How to remotely execute a script on a VMS system ? | ivancleber | AIX | 0 | 07-26-2006 10:14 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Executing remotely the script
Hi All,
I have a script to be executed in another machine. I connect to that machine from another server as a root ( this is the only configured access, as i cannot log in as a normal user). After that I have to switch to a normal user and that I can be able to executge that script. But all this is done manually, that why Im interested in finding a way to automate the execution and not typing always: remsh machine_name su - sc ./script.sh Please could anyone help me |
| Forum Sponsor | ||
|
|
|
|||
|
Quote:
Code:
remsh machine_name "su - sc -c \"./script.sh\"" |
|
|||
|
Thanks for your reply
I tried what you wrote but it didnt succeed. Here is the output vasstat1:/tmp/vms1# remsh smsc1 "su - sc -c \"./kot\"" ttytype: couldn't open /dev/tty for reading You have mail. stty: : Unknown error Not a terminal stty: : Unknown error stty: : Unknown error su: ./kot: not found. |
|
|||
|
Quote:
The last error can be solved easy: su: ./kot: not found. remsh smsc1 "su - sc -c \"<full path to location of kot>/kot\"" |
|
|||
|
Quote:
|
|
|||
|
Hi again,
The output of the script above is supposed to be returned to the calling place. I use rcp like below rcp -p /var/opt/nokia/smsc/logdata/billfiles/out 172.20.1.25:/opt/output/daily_stats/config I cannot understand why sometimes works and sometimes no, like today. It gives me this error remshd: Login incorrect Any clue? |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|