Force RSA key support for Azure DevOps Git SSH

Published on May 02, 2023

If you’re using Azure DevOps Git SSH you have to use an RSA key. This is because Azure DevOps doesn’t support the newer ed25519 keys (at time of writing). However newer versions of OpenSSH prefer ed25519 keys over RSA keys.

You have to force OpenSSH to use RSA keys for Azure DevOps Git SSH. You can do this by setting HostKeyAlgorithms and PubkeyAcceptedKeyTypes in your ~/.ssh/config file:

Host myazuredevops
HostName ssh.dev.azure.com
User myusername
IdentityFile ~/.ssh/id_rsa
AddKeysToAgent yes
PreferredAuthentications publickey
HostKeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
IdentitiesOnly yes

Then you can connect to azure with git clone git@myazuredevops:myorg/myrepo.git. Just replace ssh.dev.azure.com with myazuredevops.

Darragh ORiordan

Hi! I'm Darragh ORiordan.

I live and work in Sydney, Australia building and supporting happy teams that create high quality software for the web.

I also make tools for busy developers! Do you have a new M1 Mac to setup? Have you ever spent a week getting your dev environment just right?

My Universal DevShell tooling will save you 30+ hours of configuring your Windows or Mac dev environment with all the best, modern shell and dev tools.

Get DevShell here: ✨ https://usemiller.dev/dev-shell


Read more articles like this one...

List of article summaries

#engineering

How to add canonical meta tag in NextJs

It’s important to add a canonical meta tag to your pages to improve SEO or to avoid issues with query params in crawled pages.

You can easily add a canonical meta tag in NextJs by using the next/head component.

#engineering

Open Telemetry in NextJs and NestJs

I wrote about how to use open telemetry with NestJs and React previously.

I wanted to add open telemetry to my NextJs app that calls a NestJs backend. The paradigm of SSR preferred by NextJs is a bit different than the CSR paradigm of React.

I’ll describe the differences and how I added open telemetry to NextJs that propagates to other backend APIs.

#engineering

Comparing next start and next standalone with docker

I wrote about how to use nextjs with docker.

I wanted to compare using next standalone like in the article and just using next start.

Comments