Hi, If given the following in genkey.pl :
use Crypt::RSA; my ($rsa) = new Crypt::RSA( KF => 'SSH'); my ($pub, $prv) = $rsa->keygen( Identity => 'cc <[EMAIL PROTECTED]>', Password => 'i hate tests.', Size => 1024, Verbosity => 1, Filename => 'sshtest') or die $rsa->errstr(); There is a problem with the above as I get an error after the creation of the keys: Wide character in print at /usr/lib/perl5/site_perl/5.8.0/Crypt/RSA/Key/Private.pm line 176. Which probably means it can't write to the private file as the Private key is binary. I'm not sure if the above error is affecting my ability to read from the file, but how do I read in the SSH-formatted public and private key file? I tried the following in a different script (readkey.pl) : use Crypt::RSA; my ($prv) = new Crypt::RSA::Key::Private( Identity => 'cc <[EMAIL PROTECTED]>', Password => 'i hate tests.', KF => 'SSH', Filename => 'sshtest.private'); my ($pub) = new Crypt::RSA::Key::Public( KF => 'SSH', Filename => 'sshtest.public'); print "Public :\n"; print $pub; This doesn't work as it gives me the following error: Number found where operator expected at (eval 2) line 1, near "FORMAT 1.1" (Do you need to predeclare FORMAT?) Can't use an undefined value as a HASH reference at /usr/lib/perl5/site_perl/5.8.0/Crypt/RSA/Key/Private.pm line 220. I believe it's still looking for a 'native' key format which I don't understand why, as I've stated that it should use the KF of 'SSH'. Did I do something wrong? Any help appreciated, thanks. Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>