Workaround for Bitbucket SSH still using RSA
original date: 2015-12-28 22:35:50+00:00
So, it's almost 2016, and some people still can't be bothered to support ECDSA. Thankfully, this doesn't mean we all have to keep using RSA in any capacity other than talking to them; we can just make an SSH key that will only be used for a specific host.
-
Generate an RSA key with a specific name (avoid using
id_rsa
, since that gets used for general-purpose ssh):-
ssh-keygen -t rsa -b 4096 -f ~/.ssh/bitbucket
-
-
Copy public key to clipboard and enter into Bitbucket as an authorized key:
-
cat ~/.ssh/bitbucket.pub | xclip
- (yes, this is a useless use of cat, but it's easier to read than '<')
-
-
Use ~/.ssh/config to make SSH use this key:
Host bitbucket.org Compression yes IdentityFile ~/.ssh/id_rsa.bitbucket.private
(I also use the Compression option for the sake of speed, especially on my slow connection)