We are currently trying to establish an SSH connection to an Azure Linux VM using a Microsoft Entra ID user account. The existing approach, as documented by Microsoft, uses an OpenSSH certificate-based authentication mechanism.
The prerequisites and current process are as follows:
Generate an RSA key pair
Generate the RSA private and public key pair required for SSH authentication.
Authenticate to Microsoft Entra ID
Sign in to Azure using the Microsoft Entra ID credentials:
az login --username "EntraIDUsername" --password "EntraIDPassword"
Generate the Microsoft Entra ID–signed SSH certificate
Use the Azure CLI SSH extension to generate the short-lived SSH certificate:
az ssh cert --public-key-file "PublicKeyPath" --file "OutputCertificatePath"
Use the private key and Microsoft Entra ID–signed certificate
The generated private key and certificate are then used to establish an SSH session with the target Azure VM.
Connect using PuTTY
The generated certificate and corresponding private key can be used with an SSH client such as PuTTY, provided the client supports OpenSSH certificate-based authentication.
We would like to implement the same authentication flow using the Rebex SSH client/library instead of PuTTY/OpenSSH
Specifically, we would like to understand:
Does the current version of Rebex SSH support authentication using an OpenSSH user certificate of type ssh-rsa-cert-v01@openssh.com?
If supported, could you provide an example or recommended implementation for:
Loading the RSA private key.
Loading/associating the Microsoft Entra ID–issued OpenSSH certificate.
Using the certificate and private key to authenticate to the Azure VM.