use Net::SSH::Perl; my $host = '10.0.0.1'; my $ssh = Net::SSH::Perl->new($host); my $username = 'test_user'; my $password = 'test_pass'; my $command = 'uname -a'; $ssh->login($username, $password); print+($ssh->cmd($command))[0], "\n"; __END__ output: Linux somehost 2.6.12 #4 Fri Jul 15 10:24:21 EEST 2005 i686 unknown unknown GNU/Linux