$ ssh thartman@localhost # works fine Password: Linux none 2.4.29-linode39-1um #1 Wed Jan 19 12:22:14 EST 2005 i686 GNU/Linux... etc, etc $ exit # get back to my original process logout Connection to localhost closed. $ cat net-ssh-perl.t # the code to connect via Net::SSH::Perl use strict; use warnings; use Net::SSH::Perl; use IO::Prompt; my $ssh_box = 'localhost'; my $ssh_login = prompt "$ssh_box user: "; my $ssh_password = prompt "$ssh_box password: ", -e => '*'; my $ssh = Net::SSH::Perl->new($ssh_box); $ssh->login($ssh_login, $ssh_password); $ perl net-ssh-perl.t # same login, same password localhost user: thartman localhost password: ********* Permission denied at net-ssh-perl.t line 14 $ head -n14 net-ssh-perl.t | tail -n 1 # echo line 14 -- of course, it's the login $ssh->login($ssh_login, $ssh_password); $ #### $ perl net-ssh.t localhost user: thartman localhost command: ls blee learning nbarter pari-2.1.7 pari-2.1.7.tgz pimpmycat pmc_external_dependencies shellenv $ cat net-ssh.t use strict; use warnings; use Net::SSH qw(sshopen2); use IO::Prompt; my $ssh_box = "localhost"; my $user = prompt "$ssh_box user: ";; my $cmd = prompt "$ssh_box command: "; sshopen2("$user\@$ssh_box", *READER, *WRITER, "$cmd") || die "ssh: $!"; while () { chomp(); print "$_\n"; } close(READER); close(WRITER);