or download this
#!perl
...
#dd $ssh; # use this when debugging the
+various %options
$ssh->login($username) or die "login: $!"; # using id_rsa identificat
+ion, at default id_rsa location, or ask for pw if it fails
print map { $_//"<undef>\n", "\n----\n"} $ssh->cmd('pwd');