Back
Entra ID Login to Linux

How to Use Entra ID for SSH Login to Linux Machines

How to Use Entra ID for SSH

Entra ID is one of the most used Identity providers in the world, and not without reason; it is one of the most secure ways to authenticate users, detect intruders, and it connects with your existing Active Directory. Entra ID Allows you to protect your organization with device attestation, impossible travel detection, MFA authentication and many more features. However, when it comes to protecting your Azure Linux VMs you are stuck with legacy SSH key based authentication and SSH passwords.

While SSH keys are a great option to protect your home server, or any endpoint that might have a few engineers authenticating to it, it does not scale. When we are talking about cloud scale, adding and lifecycle the keys of authorized parties (typically engineers, devops, security engineers, etc.) that might need access to a server, across the thousands or millions of servers a company might have, it becomes a full-time job that is left unfilled. This is why SSH Certificates were created: to make the management across large enterprises easier. Don’t take my word for it, Look at this article from Meta that talks about how they use SSH certificates at scale to manage access efficiently.

What are SSH Certificates and how to use them?

SSH Certificates are basically SSH keys signed by another SSH key (the SSH Certificate Authority) with specific attributes showing how they can be used, and most importantly, they have an expiry date. Meaning that you don’t have to remove the Key when someone leaves. Instead of having complex agents in your machines that manage the SSH keys, you can rely on the certificates to automatically expire and enforce access policies.

I started talking about SSO into SSH with Entra ID and now I am talking about SSH Certificates. Did I just lose my train of thought? No, the reason of this slight tangent into SSH certificates, is because that is what EZSSH the leader in Linux access for Entra ID uses under the hood to create the SSH SSO experience with just native technology. It works by using your Entra ID token with all the fancy conditional access policies you have setup for your organization, to request a short term SSH Certificate to that specific endpoint and granting you access.

What is the user experience of using SSH Certificates with Entra ID

I know, you are probably sweating by just thinking about having to create an SSH certificate eac time that you have to access an SSH endpoint, I mean regular X509Certificates are already a pain, so how hard is it to create SSH Certificates, and your hunch is right, if you are manually running your own SSHCA then it is a pain, but with EZSSH it is as simple as running “ezssh ssh -e yourUser@yourendpoint” this will create a short term certificate and connect you to your endpoint.

How to add endpoints endpoints to your policy

Ok, the authentication is easy, but how hard is the setup? well, it is pretty easy. Once your Azure policy has been created in the EZSSH portal, you can EZSSH automatically scan and add the CA as a trusted CA to your new endpoints (we do this through VM Extensions, we never have access to your VM or data). Or you can use one of our guides to add it to your choice of deployment technology.

How does a user get authorization to an Azure endpoint

Since users use their Entra identity to login to EZSSH, EZSSH will scan the subscription RBAC and grant access to the requested endpoint based on your Azure RBAC. As simple as that, no more managing SSH keys; or special RBAC for Azure VMs, as long as you have access to the endpoint in Azure RBAC you have access to the VM.

Integrate with Azure Security

The advantages of EZSSH being integrated with Azure and AAD is that you can use all the security tools you already use to protect the rest of your Azure infrastructure. From Conditional Access, to PIM based access to your Azure resources, to even automatically requesting Azure Networking JIT to access your endpoints, EZSSH got you covered.

Multi-Cloud and Hybrid Support

In this blog post we have talked about the benefits of using EZSSH for Azure. However, one of the features that our customers enjoy the most is having EZSSH be the one stop shop for all SSH authentication. With our Hybrid policies, we allow you to use the same great EZSSH experience with any SSH endpoint, does not matter if they are on-premises, in AWS, GCP or anywhere else, as long as they use Open-SSH to authenticate users, you can use EZSSH to manage access to it.

So what are you waiting for? Make your engineers work less, and your organization more secure by requesting a demo today!