On Friday 24,August,2012 07:28 PM, Sasikanth Eda wrote:
> Hi All,
> 
> I am working on an automation scenario, where the steps mentioned below are
> to be performed;
> 
> 1. Script has to run on client machine.
> 
> 2. Using the Perl script on client machine, we need to login to remote
> machine-1 using ssh protocol.
> 
> 3. From remote machine-1, the script should login to other remote machine-2
> using ssh protocol.
> 
> 4. From remote machine-2, the script should login to other remote machine-3
> using ssh protocol and execute a command, collect the output.
> 
> Here limitations is we cannot directly contact remote machine-3 from client
> and our script should not create any copies of code on any of the remote
> machine used in the scenario.

You can try:

ssh machine-1 ' ssh machine-2 'ssh machine-3 echo "a" ' '

echo "a" is supposed one commend from your script. Sorry I don't have
much ideas about how to run the scripts, except do an anatomy.

> 
> I am a Perl beginner and explored Net::OpenSSH module, but came to know
> that, using this we can connect only to client -to- remote machine-1.
> 
> Any thoughts/example code to handle this scenario.
> 
> 
> Thanking you,


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to