use Net::SSH::Any; my $ssh = Net::SSH::Any->new($host, user => $user, password => $password, backend => 'Sshg3_Cmd'); $ssh->error and die "unable to connect to $host"; my $output = $ssh->capture('ls');