SSH für die Verbindung zu Azure DevOps oder Github
Schlüssel-Paar generieren und öffentlichen Schlüssel zum Repository kopieren
Schlüssel-Paar
ssh-keygen -C "martin@affolter.net"
Öffentlichen Schlüssel kopieren (cat gibt aus, pbcopy kopiert ins Clipboard)
cat ~/.ssh/id_rsa.pub
pbcopy < ~/.ssh/id_rsa.pub
Öffentlichen Schlüssel auf Azure Devops/Github hinzufügen.
Github: https://github.com/settings/keys
Azure: https://dev.azure.com/[Organisation]/_usersSettings/keys
Authentizität der Verbindung bestätigen
Azure
ssh -T git@ssh.dev.azure.com
Github
ssh -T git@github.com
bestätigen
Beim ersten Hinzufügen wird gefragt, ob die Authentizität des Servers Ok ist. Hier ein Beispiel mit Github:
The authenticity of host 'github.com (140.82.121.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Die Fingerprints können online überprüft werden: https://docs.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints
Nach dem Eintippen von "yes" wird gemeldet:
Warning: Permanently added 'github.com,140.82.121.3' (RSA) to the list of known hosts.
Hi Mcafee123! You've successfully authenticated, but GitHub does not provide shell access.