Again, thanks for the reply.
I've checked that one and have uploaded the openSSH format key to the server. Following this I could use puTTY for key-based logon, so I'm assuming that I've done that side of things correctly.
Nick | [reply] |
Which, on further inspection turned out to be a bad assumption. I've created a new file for the public key via the 'Conversions' menu in puttygen which gets me a bit further, or at least a different error message. Now I'm seeing:
Assertion failed: session->userauth_pblc_method_len == _libssh2_ntohu32(pubkeydata), file userauth.c, line 902
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Which is progress of a sort.
Nick
| [reply] |
On the Windows machine you will have to generate from your key two files, one for the private key and the other for the public key, both in OpenSSH format.
Then from your Perl script, call Net::SSH2::auth_publickey method, passing the names of these files.
And BTW, this is how OpenSSH private and public keys look like:
salva@leon:~$ cat /tmp/id_dsa
-----BEGIN DSA PRIVATE KEY-----
MIIBvAIBAAKBgQDnhhDCFvCQ+ejbPAwhr2BZ1tZwGesd3lVDL1qpZ96nWo+GCLHr
Xv51SQU7fW2jyo6F8u6+37p+ufNhq1ZZ4xpZW1R3KPxWwvXHDHtdQFgeHeZsA/IH
YzseEzuTsFMAlI0yGDk2sMprGmZSva97I0hnVA+PazetasviDyh7T7MMKwIVAMic
ktBUdfuHSrJeugTl5dkrEy0pAoGAOKQdIrpvhNKVxICfDfX/bj9EF7SmgQbV1mqg
pecw0CnIsvEKJab5x1h0b9WUI7+AoeGaYALdq4ILvOA+druikey25cPJy8I3k5of
TmcXBO43/Lc0f+v/0Z+Pj3xUcLsR2Ur+MS7eN4Kdei04QQ5ol0RZG3ZZ0eko+AUk
smSVkkECgYEA1zUU2gAL43pLyAJqlfDXzDHWWw2wHHNfSmzYz28VzUPnqlIMh6Fx
cWRx1tGWApNSq/0mv4IYFJ2DzGxODp8lJjnZ3YvP5qu6nzClEf0EEnxwdy6LpNFQ
rrZixsZk9Rya09rl91okX2tZzItrXc9tD205c0kTfxZVe8j+lMFYz34CFQC5PrPD
IX9Z+YmanG7JV2EVUaHv+Q==
-----END DSA PRIVATE KEY-----
salva@leon:~$ cat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