Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

From OpenSSH 7.8 the default format RSA key pair has changed

OpenSSH updates its default RSA key format, let's get prepared!

With versions of OpenSSH 7.8 and above, the private key file will start with


Instead of



The work around is to specify the format to the old PEM when generating the keys:

ssh-keygen -m PEM -t rsa -b 4096


The new format isn't currently compatible in the Access keys of a Bitbucket repository.

When I tried to connect to a repository using a key pair generated with

ssh-keygen -t rsa -b 4096

I go this error from the Bitbucket server:

Load key ".ssh/id_rsa": invalid format Permission denied (publickey).


Quote from the release note of openSSH 7.8:

ssh-keygen write OpenSSH format private keys by default
   instead of using OpenSSL's PEM format. The OpenSSH format,
   supported in OpenSSH releases since 2014 and described in the
   PROTOCOL.key file in the source distribution, offers substantially
   better protection against offline password guessing and supports
   key comments in private keys. If necessary, it is possible to write
   old PEM-style keys by adding "-m PEM" to ssh-keygen's arguments
   when generating or updating a key.


The version 7.8 is currently on Arch Linux but when it will hit the main distributions Ubuntu, Fedora, Debian it might create a lot of confusion.

Bitbucket should try to be compatible beforehand. Or in the meantime update the command line documentations to use the "-m PEM".


I hope this will help!

1 answer

:: Sorry to kind of hijack your thread ::


Adding this comment only to let future searchers eventually find it quicker.

This problema also affects bamboo when adding SSH/RSA key to access bitbucket (or other) repositories over ssh connection.

If you create the SSH/RSA key with key-gen without the "-m PEM" parameter, you'll not be able to use the key in bamboo (at least as of version 6.8.1)

After creating the shared credential with the SSH/RSA Key, when you try to test the repository access, you'll get a error message as:

"Cannot decode connection params" (Testing Repository SSH connection from bamboo to bitbucket or github).

If you follow the instructions of Romain in this post, it will work.

Thanks Romain, for pointing it out.

Can confirm same issue in Bamboo 7.0.3.

I had to run

ssh-keygen -t ecdsa -b 384 -m PEM

and not just 

ssh-keygen -t ecdsa -b 384

to get it to work with shared credentials

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events