Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: net::ssh::perl Wrong key type

by jpsaraiva (Novice)
on Aug 23, 2019 at 11:40 UTC ( #11104891=note: print w/replies, xml ) Need Help??


in reply to Re^2: net::ssh::perl Wrong key type
in thread net::ssh::perl Wrong key type

Found out a format that worked!

ssh-keygen by default generates keys like:

-----BEGIN OPENSSH PRIVATE KEY----- ...

I tried other combinations until I found one that worked:

$ openssl genrsa -out privatekey -----BEGIN RSA PRIVATE KEY----- ... $ chmod 600 privatekey $ ssh-keygen -y -f privatekey > publickey

Running the script again, results in a successful login:

localhost: Trying pubkey authentication with key file 'privatekey' localhost: Login completed, opening dummy shell channel. localhost: channel 0: new [client-session] localhost: Requesting channel_open for channel 0.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2019-09-23 03:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (276 votes). Check out past polls.

    Notices?