Change SSH key formats during a job

Some tools can have issues with the newer key formats generated and used by CircleCI. In these situations it can be helpful to change the key format within the VM 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 modify the key at run time 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.

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

Comments

0 comments

Please sign in to leave a comment.