Skip to content

Commit 5f9d41f

Browse files
committed
Alignment.
1 parent 5da3227 commit 5f9d41f

File tree

1 file changed

+70
-68
lines changed

1 file changed

+70
-68
lines changed

azure-local/manage/connect-arc-vm-using-ssh.md

Lines changed: 70 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -38,74 +38,74 @@ Before you begin, ensure that you:
3838

3939
### Install the OpenSSH Server Extension via PowerShell
4040

41-
Use the following steps to install the OpenSSH Server Extension via PowerShell
42-
43-
1. Open a Windows PowerShell session as an administrator.
44-
45-
1. Run the following cmdlets to ensure that the required Azure CLI Extensions are installed:
46-
47-
```powershell
48-
az extension add --upgrade --name connectedmachine
49-
az extension add --upgrade --name ssh
50-
```
51-
52-
1. Sign in to Azure:
53-
54-
```powershell
55-
az login --use-device-code
56-
```
57-
58-
1. Set appropriate parameters:
59-
60-
```powershell
61-
$resourceGroup="<your resource group>"
62-
$serverName = "<your server name>"
63-
$location = "<your location>"
64-
$localUser = "Administrator" # Use a local admin account for testing
65-
```
66-
67-
1. Install the `OpenSSH` Arc Extension:
68-
69-
```powershell
70-
az connectedmachine extension create --name WindowsOpenSSH
71-
--type WindowsOpenSSH --publisher Microsoft.Azure.OpenSSH --type-handler-version 3.0.1.0 --machine-name $serverName --resource-group $resourceGroup
72-
```
73-
74-
Here's a sample output:
75-
76-
```powershell
77-
PS C:\Users\labadmin> az connectedmachine extension create --name WindowsOpenSSH --location westeurope --type WindowsOpenSSH --publisher Microsoft.Azure.OpenSSH --type-handler-version 3.0.1.0 --machine-name $serverName --resource-group $resourceGroup
78-
{
79-
"id": "/subscriptions/<SubscriptionName>/resourceGroups/<ResourceGroupName>/providers/<ProviderName>/machines/<MachineName>/extensions/WindowsOpenSSH",
80-
"location": "westeurope",
81-
"name": "WindowsOpenSSH",
82-
"properties": {
83-
"autoUpgradeMinorVersion": false,
84-
"enableAutomaticUpgrade": true,
85-
"instanceView": {
86-
"name": "WindowsOpenSSH",
87-
"status": {
88-
"code": "0",
89-
"level": "Information",
90-
"message": "Extension Message: OpenSSH Successfully enabled"
91-
},
92-
"type": "WindowsOpenSSH",
93-
"typeHandlerVersion": "3.0.1.0"
94-
},
95-
"provisioningState": "Succeeded",
96-
"publisher": "Microsoft.Azure.OpenSSH",
97-
"type": "WindowsOpenSSH",
98-
"typeHandlerVersion": "3.0.1.0",
99-
},
100-
"resourceGroup": "<ResourceGroupName>",
101-
"type": "Microsoft.HybridCompute/machines/extensions"
102-
}
103-
PS C:\Users\labadmin>
104-
```
105-
106-
6. You can see `WindowsOpenSSH` Extension in the Azure portal Extensions list view.
107-
108-
:::image type="content" source="./media/connect-arc-vm-using-ssh/azure-portal-extensions-list-view-3.png" alt-text="Screenshot of Azure portal Extensions list view." lightbox="./media/connect-arc-vm-using-ssh/azure-portal-extensions-list-view-3.png":::
41+
Use the following steps to install the OpenSSH Server Extension via PowerShell:
42+
43+
1. Open a Windows PowerShell session as an administrator.
44+
45+
1. Run the following cmdlets to ensure that the required Azure CLI Extensions are installed:
46+
47+
```powershell
48+
az extension add --upgrade --name connectedmachine
49+
az extension add --upgrade --name ssh
50+
```
51+
52+
1. Sign in to Azure:
53+
54+
```powershell
55+
az login --use-device-code
56+
```
57+
58+
1. Set appropriate parameters:
59+
60+
```powershell
61+
$resourceGroup="<your resource group>"
62+
$serverName = "<your server name>"
63+
$location = "<your location>"
64+
$localUser = "Administrator" # Use a local admin account for testing
65+
```
66+
67+
1. Install the `OpenSSH` Arc Extension:
68+
69+
```powershell
70+
az connectedmachine extension create --name WindowsOpenSSH
71+
--type WindowsOpenSSH --publisher Microsoft.Azure.OpenSSH --type-handler-version 3.0.1.0 --machine-name $serverName --resource-group $resourceGroup
72+
```
73+
74+
Here's a sample output:
75+
76+
```powershell
77+
PS C:\Users\labadmin> az connectedmachine extension create --name WindowsOpenSSH --location westeurope --type WindowsOpenSSH --publisher Microsoft.Azure.OpenSSH --type-handler-version 3.0.1.0 --machine-name $serverName --resource-group $resourceGroup
78+
{
79+
"id": "/subscriptions/<SubscriptionName>/resourceGroups/<ResourceGroupName>/providers/<ProviderName>/machines/<MachineName>/extensions/WindowsOpenSSH",
80+
"location": "westeurope",
81+
"name": "WindowsOpenSSH",
82+
"properties": {
83+
"autoUpgradeMinorVersion": false,
84+
"enableAutomaticUpgrade": true,
85+
"instanceView": {
86+
"name": "WindowsOpenSSH",
87+
"status": {
88+
"code": "0",
89+
"level": "Information",
90+
"message": "Extension Message: OpenSSH Successfully enabled"
91+
},
92+
"type": "WindowsOpenSSH",
93+
"typeHandlerVersion": "3.0.1.0"
94+
},
95+
"provisioningState": "Succeeded",
96+
"publisher": "Microsoft.Azure.OpenSSH",
97+
"type": "WindowsOpenSSH",
98+
"typeHandlerVersion": "3.0.1.0",
99+
},
100+
"resourceGroup": "<ResourceGroupName>",
101+
"type": "Microsoft.HybridCompute/machines/extensions"
102+
}
103+
PS C:\Users\labadmin>
104+
```
105+
106+
1. You can see `WindowsOpenSSH` Extension in the Azure portal Extensions list view.
107+
108+
:::image type="content" source="./media/connect-arc-vm-using-ssh/azure-portal-extensions-list-view-3.png" alt-text="Screenshot of Azure portal Extensions list view." lightbox="./media/connect-arc-vm-using-ssh/azure-portal-extensions-list-view-3.png":::
109109

110110
## Use SSH to connect to Azure Local
111111

@@ -140,6 +140,8 @@ Use the following steps to connect to Azure Local.
140140

141141
:::image type="content" source="./media/connect-arc-vm-using-ssh/rdp-login-dialog-for-ssh-arc-connection-6.png" alt-text="Screenshot of the RDP server sign-in dialog to connect to Windows Server over SSH." lightbox="./media/connect-arc-vm-using-ssh/rdp-login-dialog-for-ssh-arc-connection-6.png":::
142142

143+
1. You can see the desktop for the remote desktop connection.
144+
143145
:::image type="content" source="./media/connect-arc-vm-using-ssh/rdp-desktop-for-ssh-arc-connection-9.png" alt-text="Screenshot of the RDP desktop to connect to Windows Server over SSH." lightbox="./media/connect-arc-vm-using-ssh/rdp-desktop-for-ssh-arc-connection-9.png":::
144146

145147
You set up an RDP tunnel over SSH into your Azure Local using Azure CLI without any VPN or open ports at your firewall.

0 commit comments

Comments
 (0)