in reply to How to open nested SSH connection using perl

Which operating system runs on each server and on the machine running the Perl script?

Also, is port forwarding enabled in server A?

  • Comment on Re: How to open nested SSH connection using perl

Replies are listed 'Best First'.
Re^2: How to open nested SSH connection using perl
by gjoshi (Sexton) on Jul 10, 2015 at 09:19 UTC
    all of them on Linux
      Manually I can ssh to server A and from there I can ssh to server B. Manually it is working fine. thanks --girija
        how about my second question? are tunnels enabled on the gateway machine?

        Also, which version of the ssh client is installed on the machine where you run the Perl script.

        Update: in order to check if port forwarding is enabled, run the following command:

        ssh serverA -W serverB:22
        replacing serverA and serverB by the real hostnames or IPs.

        If you get a response similar to...

        SSH-2.0-OpenSSH_6.7p1 Ubuntu-5ubuntu1
        it means that port forwarding is enabled.