Howto use -o option?
MarcusCaepio opened this issue · 3 comments
MarcusCaepio commented
Hi all,
I am using https://metacpan.org/pod/Net::SSH2::Cisco to connect to a cisco device.
Unfortunately, I have to set the ssh option -oKexAlgorithms=+diffie-hellman-group1-sha1 on some host, but I cannot find a option whether in Net::SSH2 nor in Net::SS2::Cisco.
Can you tell me, how I have to define it?
Thanks in advance,
Marcus
salva commented
Net::SSH2 provides the method method for that.
I don't know how that feature can be accessed from Net::SSH2::Cisco though.
MarcusCaepio commented
Thanks salva. Seems there is no way to contact the maintainer of Net::SSH2::Cisco and he just did not implemented it
salva commented
Net::SSH2::Cisco
has method ssh
giving you access to the underlying Net::SSH2
object. Something like the following should work:
my $session = Net::SSH2::Cisco->new(host => ...);
$session->ssh->method(...);
$session->login('login', 'password');