How to export variables on remote machine through ssh.
- From: gajendrasharma1 <gajendra.sharma@xxxxxxx>
- Date: Tue, 27 Nov 2007 06:53:36 -0800 (PST)
Hello experts,
I need ur help on solving this problem.
I am writing a automation tool that runs several shell scripts on different
remote hosts using ssh. These scripts need various pre-defined variables to
run. I want to provide these variables to the script by exporting these
variables after doing ssh and then run the script that use it, like this:
a=10
ssh -l $user $host "export myVar=$a; cd $myDir; ./myScript.sh"
this doesn't work, as probably the ssh shell might not understand the export
command.
Can anybody please tell me how shall i solve this problem.
Thanks.
Gajendra
--
View this message in context: http://www.nabble.com/How-to-export-variables-on-remote-machine-through-ssh.-tf4882213.html#a13972248
Sent from the SSH (Secure Shell) mailing list archive at Nabble.com.
- Follow-Ups:
- Re: How to export variables on remote machine through ssh.
- From: Jan Pechanec
- Re: How to export variables on remote machine through ssh.
- From: Greg Wooledge
- Re: How to export variables on remote machine through ssh.
- From: Joseph Spenner
- Re: How to export variables on remote machine through ssh.
- From: william estrada
- Re: How to export variables on remote machine through ssh.
- Prev by Date: Re: Restricted (ksh -r) shell and SSH on AIX5.1
- Next by Date: Re: How to export variables on remote machine through ssh.
- Previous by thread: Re: Closing a process when SSH is interrupted?
- Next by thread: Re: How to export variables on remote machine through ssh.
- Index(es):
Relevant Pages
|