Search code examples
gitazure-devopsssh

AzureDevops depricating ssh-rsa, however no matter what I do the new rsa-sha2-256 keys won't work


Even after updating the keys still getting the following error:

remote: Command git-upload-pack: You’re using ssh-rsa that is about to be deprecated and your request has been blocked intentionally. Any SSH session using SSH-RSA is subject to brown out (failure during random time periods). Please use rsa-sha2-256 or rsa-sha2-512 instead. For more details see https://aka.ms/ado-ssh-rsa-deprecation.

System details:

  • OS: Debian 10
  • OpenSSH version: OpenSSH_9.3p1, OpenSSL 1.1.1n 15 Mar 2022
  • git version: git version 2.20.1

generated new keys using: ssh-keygen -t rsa-sha2-512

the keys just refuse to work.


Solution

  • According to this Q&A, you may have previously modified your SSH config to downgrade your security settings for Azure DevOps by adding the following to your ~/.ssh/config file:

    Host ssh.dev.azure.com vs-ssh.visualstudio.com
      HostkeyAlgorithms +ssh-rsa
    

    Please remove these lines now and make sure rsa-sha2-256 and/or rsa-sha2-512 are allowed.