in reply to Re: Net::OpenSSH pass options to ssh
in thread Net::OpenSSH pass options to ssh

Hello my question is more related to pass several options to SSH using default_ssh_opts

Replies are listed 'Best First'.
Re^3: Net::OpenSSH pass options to ssh
by salva (Canon) on Mar 19, 2019 at 12:00 UTC
    Net::OpenSSH constructor accepts two different sets of options to be passed to ssh: master_opts and default_ssh_opts.

    The first set goes into the ssh call that connects to the remote machine and creates the multiplexing socket.

    The second set goes into the ssh calls that are used to run the remote commands (when calling system or capture, for instance). They reuse the connection established by the master ssh process, and so at that point it is usually too late to set most of the options supported by ssh. In practice, using default_ssh_opts is very uncommon.

Re^3: Net::OpenSSH pass options to ssh
by thanos1983 (Parson) on Mar 18, 2019 at 15:49 UTC

    Hello zn553,

    I was under the impression that you asked how to pass multiple commands, this is why I post my answer. Well fellow Monk salva has answered your question already :).

    BR / Thanos

    Seeking for Perl wisdom...on the process of learning...not there...yet!