#!/apps/perl/bin/perl use Net::SSH::Perl ; chomp(my $this_host = `hostname`); print "Enter host name : [$this_host] "; chomp(my $host = ); print "\n"; my $this_user = scalar getpwuid($<); print "Enter your username : [$this_user] "; chomp(my $user = ); print "And your password: "; chomp(my $pass =); $scon = Net::SSH::Perl->new ($host || $this_host, protocol => 2, debug => 1); $scon->login($user || $this_user,$pass); print "looking around ...\n"; my($output,$errors,$exit) = $scon->cmd("ls -l"); print "output:$output|\n"; print "errors:$errors|\n"; print "exit:$exit|\n";