undefined method `generate' for OpenSSL::PKey::EC:Class whe starting an SSH session with a private key

This page summarizes the projects mentioned and recommended in the original post on /r/ruby

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • openssl

    Provides SSL, TLS and general purpose cryptography. (by ruby)

    JRuby doesn't use the official openssl gem which contains C extensions that compile against libopenssl, but instead uses jruby-openssl. There are a few minor compatibility issues with jruby-openssl. I've ran into the missing EC.generate method before. In theory CRuby's openssl OpenSSL::PKey::EC.generate creates a new OpenSSL::PKey::EC object and calls #generate_key, but trying that in JRuby produces a smaller EC key implying there's some data missing from the EC key, so I'm not sure if that approach is equivalent.

  • jruby-openssl

    JRuby's OpenSSL gem

    JRuby doesn't use the official openssl gem which contains C extensions that compile against libopenssl, but instead uses jruby-openssl. There are a few minor compatibility issues with jruby-openssl. I've ran into the missing EC.generate method before. In theory CRuby's openssl OpenSSL::PKey::EC.generate creates a new OpenSSL::PKey::EC object and calls #generate_key, but trying that in JRuby produces a smaller EC key implying there's some data missing from the EC key, so I'm not sure if that approach is equivalent.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts