|
1 | 1 | Contoso uses SSH for their Windows machines to provide secure management, remote access to resources, and updates. They want to apply that same level of security to their Linux systems. Through SSH, Azure Arc provides Contoso with a secure, encrypted connection for managing both their Windows and Linux machines.
|
2 | 2 |
|
3 |
| -SSH for Azure Arc provides SSH-based connections to Linux machines on Azure Arc without requiring a public IP address or other open ports. This functionality can be used interactively, automated, or with existing SSH-based tooling, allowing existing management tools to have a greater impact. SSH access allows you to reach your Linux machines through a simple Azure CLI command or through Microsoft PowerShell. You can use your existing local SSH keys to connect to your Linux machines. |
| 3 | +SSH for Azure Arc provides SSH-based connections to Linux machines on Azure Arc without requiring a public IP address or other open ports. This functionality can be used interactively, automated, or with existing SSH-based tooling, allowing existing management tools to have a greater impact. With SSH you can access any of your machines, in any network, with one Azure CLI or Microsoft PowerShell command. You can use your existing local SSH keys to connect to your machines. With Linux machines, you can also use SSH with Microsoft Entra credentials. |
4 | 4 |
|
5 |
| -Additionally, you can use SSH with Microsoft Entra credentials. With SSH you can access any of your machines, in any network, with one command. All without exposing a public IP address or opening more inbound firewall ports. |
6 |
| - |
7 |
| -> [!NOTE] |
8 |
| -> Microsoft Entra authorization is limited to Linux machines. |
9 |
| -
|
10 |
| -## Supported Linux environments |
11 |
| - |
12 |
| -For SSH access to Azure Arc-enabled servers, the supported Linux environments include: |
13 |
| - |
14 |
| -- RedHat Enterprise Linux (RHEL) 7, 8, and 9 |
15 |
| -- SUSE Linux Enterprise Server (SLES) 12 SP3-SP5 and 15 |
16 |
| -- Ubuntu 18.04, 20.04, and 22.04 LTS12 |
17 |
| -- Azure Linux (CBL-Mariner) 2.0 |
18 |
| -- AlmaLinux 9 |
19 |
| -- Amazon Linux 2 and 2023 |
20 |
| -- Debian 11 and 12 |
21 |
| -- Oracle Linux 7, 8, and 9 |
22 |
| -- Rocky Linux 8 and 9 |
23 |
| - |
24 |
| -## Enabling SSH functionality |
25 |
| - |
26 |
| -In order to connect to a Linux resource using SSH through Azure Arc, the resource needs to be fully Arc-enabled. That means that it already has the Azure Arc Connected machine agent installed and functioning properly, so that the resource appears as an Arc resource in the Azure portal. |
| 5 | +## Enable SSH functionality |
27 | 6 |
|
28 | 7 | To use SSH with a Linux machine connected via Azure Arc, the following high-level steps are required:
|
29 | 8 |
|
30 | 9 | 1. Verify that you satisfy all the prerequisites. You need:
|
31 | 10 |
|
32 |
| - - Azure CLI installed on your remote work station |
| 11 | + - Azure CLI or Azure PowerShell installed on your remote workstation. The examples below use Azure CLI. |
33 | 12 | - To be logged in to your Azure environment
|
| 13 | + - `openssh-server` installed on the machine via a package manager |
34 | 14 |
|
35 | 15 | 1. Enable connections on the Connected Machine agent installed on the Linux machine.
|
36 | 16 |
|
37 |
| - Run the following command to view your current connections: |
| 17 | + View your current connections: |
38 | 18 |
|
39 | 19 | `azcmagent config list`
|
40 | 20 |
|
41 |
| - If you have existing ports, you need to include them in the following command: |
| 21 | + Ensure connection is enabled to a specific port: |
42 | 22 |
|
43 |
| - `azcmagent config set incomingconnections.ports 22<,other open ports,...>` |
| 23 | + `azcmagent config set incomingconnections.ports 22` |
44 | 24 |
|
45 |
| - If you're using a nondefault port for your SSH connection, replace port 22 with your desired port in the previous command. |
| 25 | + Replace port 22 in this command if you use a different port, or add additional ports if needed. |
46 | 26 |
|
47 | 27 | 1. Install the SSH extension on your remote workstation:
|
48 | 28 |
|
49 | 29 | `az extension add --name ssh`
|
50 | 30 |
|
51 |
| -1. Run the following command to make the connection between the workstation to the linux machine through Azure Arc: |
| 31 | +1. Make the connection between the workstation to the Linux machine through Azure Arc: |
52 | 32 |
|
53 |
| - `az ssh arc --resource-group \<resource-group\> \<host-name\> --local-user \<local-user-name\>` |
| 33 | + `az ssh arc --resource-group YOUR_RESOURCE_GROUP YOUR_HOSTNAME --local-user YOUR_LOCAL_USER_NAME` |
54 | 34 |
|
55 |
| - To connect using Microsoft Entra ID instead of connecting as a local user, remove the `--local-user` parameter from the preceding command. You need to already be logged in through Microsoft Entra ID for this method to work. |
| 35 | + To connect using Microsoft Entra ID instead of connecting as a local user, remove the `--local-user` parameter from the preceding command. You need to already be logged in through Microsoft Entra ID for this method to work, and additional packages must be installed on the Linux machine. |
56 | 36 |
|
57 | 37 | Once you establish your SSH connection, you can manage the Linux resource securely.
|
0 commit comments