Question

I'm using Net::OpenSSH module to connect to a node. But while connecting to the node, I need to specify -v for ssh as ssh -v admin@hostname. Tried using master_opts and default_ssh_opts. But they didn't work.

my $ssh = Net::OpenSSH->new("$user_name\:$password\@$server",strict_mode => 0, default_ssh_opts => [-o => "-v"]);

How can this be achieved?

Was it helpful?

Solution

my $ssh = Net::OpenSSH->new($server,
                            user => $user_name,
                            password => $password,
                            strict_mode => 0,
                            master_opts => ['-v']);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top