Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Convert pem to ssh-rsa

by jpsaraiva (Acolyte)
on Aug 23, 2019 at 14:33 UTC ( #11104899=note: print w/replies, xml ) Need Help??


in reply to Re: Convert pem to ssh-rsa
in thread Convert pem to ssh-rsa

Hello hippo, That worked! Thanks a million.
use Crypt::PK::RSA; my $pk = Crypt::PK::RSA->new(); $pk->generate_key(256, 65537); my $private_pem = $pk->export_key_pem('private'); my $public_pem = $pk->export_key_pem('public'); use Net::SSH::Perl::Key; my $key = Net::SSH::Perl::Key->read_private('RSA', \$private_pem); say $key->dump_public;

Output:

ssh-rsa AAAAB...

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11104899]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2020-01-22 05:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?