Change SSH Key Format For Use With Tools Requiring RSA

Convert To RSA Format

Some tools have issues with the newer key formats generated and used by CircleCI. In these situations it can be helpful to change the key pair to RSA format so that older tools can communicate using them. For example, JGit+JSch can fail on CircleCI when using the newer OpenSSH keys created by default.

Using ssh-keygen, we can change the key to a RSA format:

ssh-keygen -p -f ~/.ssh/id_rsa -m pem -q -N ""

This will reformat the key, and it can successfully be used for authentication. After this, upload the converted public key to GitHub under Deploy keys and the private key to your CircleCI account under SSH Keys. Finally, update your .circleci/config.yml with the newly converted key which will allow for the use of tools requiring the older RSA format.

 

Additional Resources:

Was this article helpful?
1 out of 2 found this helpful

Comments

0 comments

Article is closed for comments.