Forum Discussion

KoenigConstantin's avatar
KoenigConstantin
Copper Contributor
Jun 26, 2023

Adding Extension AADSSHLogin over AZ CLI

Good day,
I would like to add some servers to Azure Arc in an automated way. However, one of the requirements is that people can connect via AADSSH.
Therefore, as the title says, I am trying to add the extension: AADSSHLogin via the AZ client.
However, I can't find any documentation on how to do this.
Can anyone help me? Or are there other solutions than via the portal?

8 Replies

  • Fjorgego's avatar
    Fjorgego
    Copper Contributor
    Hi, did you try to do via Azure CLI?
    Register the AADSSHLogin extension provider with Azure Resource Manager:
    az provider register --namespace 'Microsoft.Azure.AppService' --subscription <subscription_id>

    Install the AADSSHLogin extension on your Azure Arc server. The following command installs the extension on a specific machine identified by its resource ID:
    az k8s-extension create --name aadsshlogin --cluster-type connectedClusters --cluster-name <cluster_name> --resource-group <resource_group_name> --extension-type 'Microsoft.Azure.AppServices.appservices-arc-ssh-login' --extension-name aadsshlogin --auto-upgrade-minor-version --scope cluster --release-train stable --configuration-settings "ClientMode=ClientCertificate"

    Replace <cluster_name> with the name of your Azure Arc cluster and <resource_group_name> with the name of the resource group containing the cluster.

    Best Regards
    • KoenigConstantin's avatar
      KoenigConstantin
      Copper Contributor

      Hey Fjorgego 

      Thanks for your answer.

      Unfortunately, I don't have a cluster but individual Arc Server's in Azure Arc.
      Do you know the command for this as well?

       

      Kind Regards

      • Fjorgego's avatar
        Fjorgego
        Copper Contributor
        Hey!!
        You can try this:
        Replace <cluster_name> with the name of your individual AKS instance in the --cluster-name parameter.
        Change the --scope parameter from cluster to namespace to specify the namespace within the individual AKS instance where the extension will be installed. You can replace <namespace> with the desired namespace.
        Keep the other parameters and values as they are and make sure to replace <individual_aks_name>, <resource_group_name>, and <namespace> with the actual names relevant to your setup.

Resources