in reply to Re^2: Problems with Net::OpenSSH
in thread Problems with Net::OpenSSH

Is there any command you can send the remote box to close the session?

For instance:

my $out = $ssh->capture({stdin_data => "show ip arp\nexit\n"});