in reply to using ssh within perl script
This sounds like an authentication problem to me... Are you doing password auth or public key? Either way, ssh generally doesn't like taking password or passphrase input that doesn't come from a terminal.
I also recommend that you use Net::SSH, but if you post the code you're using, we'll have a much better chance of helping you out.