Hi Lee, If you can login to your switch via ssh, run required commands on the switch and exit out, you should be able to simulate the same via Net::OpenSSH or Net::SSH::Perl
Cheers, Shekar On Mon, Jul 4, 2016 at 8:18 PM, lee <l...@yagibdah.de> wrote: > Shlomi Fish <shlo...@shlomifish.org> writes: > > > Hi lee, > > > > On Mon, 04 Jul 2016 04:18:22 +0200 > > lee <l...@yagibdah.de> wrote: > > > >> Hi, > >> > >> would it be possible to use something like Net::SSH::Perl to > >> automatically alter the configuration of a switch into which I can log > >> in manually via ssh? > > [SNIPPED] > >> Once per hour or so, the connections could be switched again to check > >> whether the one on port 2 is working again. So I'd be writing a deamon > >> in perl for this --- not a problem, except for communicating with the > >> switch. From the documentation of Net::SSH::Perl, it's not clear to me > >> how to receive any output the switch might send. > >> > >> > >> What would you suggest how to communicate with the switch? Is > >> Net::SSH::Perl the right tool to use? > >> > > > > It should be possible to use one SSH module or another for this - see > > http://perl-begin.org/uses/remote-login-and-commands/#ssh . Regarding > your > > question about Net::SSH::Perl, I believe you need the $out, $err, etc. > from > > https://metacpan.org/pod/Net::SSH::Perl#out-err-exit-ssh-cmd-cmd-stdin > > Thank you! I'm not set on a particular module, Net::SSH::Perl is only > what I found when I was looking. Net::OpenSSH looks better to me. > > I guess I'll have to try it out and see if it works. The ssh > implementation the switch uses is probably somewhat different from the > implementations these modules have been made to work with, so that could > give me trouble. But it works fine when I just ssh into the switch, so > why shouldn't it work. > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >