ssh2.cr icon indicating copy to clipboard operation
ssh2.cr copied to clipboard

Unrecognized private key file

Open waghanza opened this issue 7 years ago • 1 comments

Hi @datanoise,

Using

  • Crystal 0.26.1
  • LLVM 4
  • OpenSSH 7.8p1
  • OpenSSL 1.1.0i

I have this message

Unhandled exception: ERR -16: Unable to extract public key from private key file: Wrong passphrase or invalid/unrecognized private key file format (SSH2::SessionError)
  from ???
  from /usr/share/crystal/src/gc/boehm.cr:71:5 in '__crystal_main'
  from /usr/share/crystal/src/crystal/main.cr:47:14 in 'main'
  from __libc_start_main
  from _start
  from ???

when using session.login_with_pubkey

but it works (same code) with

  • Crystal 0.26.1
  • LLVM 4
  • OpenSSH 7.5p1
  • OpenSSL 1.1.0h

Regards,

waghanza avatar Oct 11 '18 19:10 waghanza

in fact, I use ssh-keygen from OpenSSH instead of generating private key from https://github.com/libssh2/libssh2

waghanza avatar Oct 11 '18 19:10 waghanza