use Strict; use warnings; use Net::SSH::Perl; use Net::SSH2; $ENV{HOME} = "PATH"; print "Server Name to Connect:"; chomp($host = ); print "User Name to Login:";chomp($LoginName = ); print "Password for $LoginName:";chomp($pswd = ); #!/usr/bin/perl -w my $command = "date"; my $ssh = Net::SSH::Perl->new($host); my $status = $ssh->login($LoginName,$pswd); my($stdout,$stderr,$exit) = $ssh->cmd($command); print "$stdout\n";