Issue
After setting up a SSH
key for GIT
in Azure DevOps
, the following test command ...
user@fedora33$ ssh -T [email protected]
is still prompting me for a password (as demonstrated further below).
In bullet form, here's what I did so you can help me. (Thank you in advance).
cd ${HOME}/.ssh/
user@fedora33$ ssh-keygen -t rsa -b 4096 -f id_rsa.azdevops
vi ./config # And entered in the following snippet:
Host ssh.dev.azure.com
Hostname ssh.dev.azure.com
IdentityFile ~/.ssh/id_rsa.azdevops
IdentitiesOnly yes
User FirstName.LastName
Next, I added the generated SSH
key to Azure DevOps
here (using the add wizard):
https://dev.azure.com/<OrgName>/_usersSettings/keys
and pasted the contents of ${HOME}/.ssh/id_rsa.azdevops.pub
into it's Public Key Data
box.
Permissions on and within ${HOME}/.ssh/
are properly tightened:
5242887 4 drwx------ 2 user user 4096 Jan 20 13:04 .ssh
5252250 4 -rw------- 1 user user 1238 Jan 20 13:04 .ssh/config
5242899 4 -rw------- 1 user user 3381 Jan 20 13:01 .ssh/id_rsa.azdevops-ssh.ZAAPS
5242910 4 -rw-r--r-- 1 user user 741 Jan 20 13:01 .ssh/id_rsa.azdevops-ssh.ZAAPS.pub
Still, a password is being requested:
user@fedora33$ ssh -T [email protected]
[email protected]'s password:
I've done this a million times before. Why is it asking for a password now?
Thank you in advance!
Solution
Ah, just as I completed this step-by-step question, I found that, as of Fedora-33
, an extra K/V
pair -- PubkeyAcceptedKeyTypes ssh-rsa
-- is now required in ${HOME}/.ssh/config
:
PubkeyAcceptedKeyTypes ssh-rsa <--- Required as of Fedora-33 (Global scope)
Host ssh.dev.azure.com
Hostname ssh.dev.azure.com
IdentityFile ~/.ssh/id_rsa.azdevops
IdentitiesOnly yes
PubkeyAcceptedKeyTypes ssh-rsa <--- Required as of Fedora-33 (Host scope)
User FirstName.LastName
I should also mention that this isn't an Azure DevOps
specific issue. I reproduced the same with GitHub
. So this was an entirely Fedora-33
version related issue.
I lost 4-hours on this esoteric issue, so I hope this helps others! =:)
Answered By - NYCeyes Answer Checked By - Pedro (WPSolving Volunteer)