If you’re encountering slowness using the Net::SSH::Perl module connecting to a site, are you using DSA keys?
In my Ubuntu 7.04, I discovered that the Crypt::DSA module was only using /dev/random to get its randomness. /dev/random gives true randomness as such will block if the kernel’s entropy pool is empty (cat /dev/random, if you don’t see any garbage, then the pool is empty).
The fix is to edit /usr/local/share/perl/5.8.8/Crypt/DSA/Util.pm find the reference to /dev/random and change it to /dev/urandom.
Note: I’m not sure the security implications of doing this. It may be really, really bad. On the other hand, your scripts timing out and not working are also an issue. Pick you poison and caveat emptor.
