#!/usr/bin/perl use Net::SSH2; $ssh2 = Net::SSH2->new(); $ssh2->connect('asdfasdfas.com') or die $!; $ssh2->auth_password('user','pass') or die "Unable to login $@ \n"; $ssh2->debug(0); $chan2 = $ssh2->channel(); $chan2->blocking(0); $chan2->shell(); print $chan2 "bash ~/md5xml\n"; print "LINE : $_" while <$chan2>; $chan2->close; print 'done...';