in reply to Connection to devices and command execution

Even after reading your follow-up to this question I'm still unclear what you mean by "...After I successfully connect to Device B, i need to run a unique command (not using SSH/Telnet) and connect to Device C..."

-----             -----            -----
| A | <-> SSH <-> | B | <-> ?? <-> | C |
-----             -----            -----

So from A to B you have an SSH connection, will run some commands on B. For that you could use Net::SSH::Expect or Net::SSH2::Expect. Then B is supposed to execute some commands on C and gather information. What protocol will be spoken between those two boxes, if not telnet nor SSH? Is there a daemon set up on C listening to requests from B and responding?


Dave

  • Comment on Re: Connection to devices and command execution

Replies are listed 'Best First'.
Re^2: Connection to devices and command execution
by Anonymous Monk on Feb 08, 2017 at 06:40 UTC
    Hi Dave Thanks for your reply. I will give the output received when i do it manually.

    sramaraj@inchetufmstg04 ~$ ssh -l gncstool -p 22 10.116.239.2
    Password:
    Last login: Wed Feb 8 10:32:52 2017 from 93.183.30.217 Sun Microsystems Inc. SunOS 5.10 Generic January 2005
    gncstool@seyuas1> eaw MSC01
    <

    inchetufmstg04 - Device A
    10.116.239.2(seyuas1) - Device B
    MSC01 - Device C
    to connect to Device c "eaw MSC01" is used. And once we are connected successfully, we get the Device c prompt which is "<"
    we execute the commands on Device c to fetch required information