You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/bastion/bastion-connect-vm-ssh-linux.md
+13-21Lines changed: 13 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ author: cherylmc
6
6
ms.service: bastion
7
7
ms.custom: linux-related-content
8
8
ms.topic: how-to
9
-
ms.date: 10/13/2023
9
+
ms.date: 04/26/2024
10
10
ms.author: cherylmc
11
11
---
12
12
13
13
# Create an SSH connection to a Linux VM using Azure Bastion
14
14
15
15
This article shows you how to securely and seamlessly create an SSH connection to your Linux VMs located in an Azure virtual network directly through the Azure portal. When you use Azure Bastion, your VMs don't require a client, agent, or additional software.
16
16
17
-
Azure Bastion provides secure connectivity to all of the VMs in the virtual network in which it's provisioned. Using Azure Bastion protects your virtual machines from exposing RDP/SSH ports to the outside world, while still providing secure access using RDP/SSH. For more information, see the [What is Azure Bastion?](bastion-overview.md)overview article.
17
+
Azure Bastion provides secure connectivity to all of the VMs in the virtual network in which it's provisioned. Using Azure Bastion protects your virtual machines from exposing RDP/SSH ports to the outside world, while still providing secure access using RDP/SSH. For more information, see the [What is Azure Bastion?](bastion-overview.md) article.
18
18
19
19
When connecting to a Linux virtual machine using SSH, you can use both username/password and SSH keys for authentication. The SSH private key must be in a format that begins with `"-----BEGIN RSA PRIVATE KEY-----"` and ends with `"-----END RSA PRIVATE KEY-----"`.
20
20
@@ -41,28 +41,24 @@ In order to make a connection, the following roles are required:
41
41
In order to connect to the Linux VM via SSH, you must have the following ports open on your VM:
42
42
43
43
* Inbound port: SSH (22) ***or***
44
-
* Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion). This setting requires the **Standard** SKU tier.
44
+
* Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion). This setting is not available for the Basic or Developer SKU.
45
45
46
46
## Bastion connection page
47
47
48
-
1. In the [Azure portal](https://portal.azure.com), go to the virtual machine to which you want to connect. On the **Overview** page for the virtual machine, select **Connect**, then select **Bastion** from the dropdown to open the Bastion page.
48
+
1. In the Azure portal, go to the virtual machine to which you want to connect. At the top of the virtual machine**Overview** page, select **Connect**, then select **Connect via Bastion** from the dropdown. This opens the **Bastion** page. You can go to the Bastion page directly in the left pane.
49
49
50
50
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/bastion.png" alt-text="Screenshot shows the Overview page for a virtual machine." lightbox="./media/bastion-connect-vm-ssh-linux/bastion.png":::
51
51
52
52
1. On the **Bastion** page, the settings that you can configure depend on the Bastion [SKU](bastion-overview.md#sku) tier that your bastion host has been configured to use.
53
53
54
-
* If you're using the **Standard** SKU, **Connection Settings** values (ports and protocols) are visible and can be configured.
54
+
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/connection-settings.png" alt-text="Screenshot shows connection settings for SKUs higher than the Basic SKU." lightbox="./media/bastion-connect-vm-ssh-linux/connection-settings.png":::
55
55
56
-
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/bastion-connect-full.png" alt-text="Screenshot shows connection settings for the Standard SKU." lightbox="./media/bastion-connect-vm-ssh-linux/bastion-connect-full.png":::
56
+
* If you're using a SKU higher than the Basic SKU, **Connection Settings** values (ports and protocols) are visible and can be configured.
57
57
58
-
* If you're using the **Basic** SKU, you can't configure **Connection Settings** values. Instead, your connection uses the following default settings: SSH and port 22.
59
-
60
-
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/basic.png" alt-text="Screenshot shows connection settings for the Basic SKU." lightbox="./media/bastion-connect-vm-ssh-linux/basic.png":::
58
+
* If you're using the Basic SKU or Developer SKU, you can't configure **Connection Settings** values. Instead, your connection uses the following default settings: SSH and port 22.
61
59
62
60
* To view and select an available **Authentication Type**, use the dropdown.
63
61
64
-
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/authentication-type.png" alt-text="Screenshot shows authentication type settings." lightbox="./media/bastion-connect-vm-ssh-linux/authentication-type.png":::
65
-
66
62
1. Use the following sections in this article to configure authentication settings and connect to your VM.
67
63
68
64
*[Username and password](#password-authentication)
@@ -78,7 +74,7 @@ Use the following steps to authenticate using username and password.
78
74
79
75
1. To authenticate using a username and password, configure the following settings.
80
76
81
-
***Connection Settings** (Standard SKU only)
77
+
***Connection Settings**: Only available for SKUs higher than the Basic SKU.
82
78
83
79
***Protocol**: Select SSH.
84
80
***Port**: Specify the port number.
@@ -99,7 +95,7 @@ Use the following steps to authenticate using a password from Azure Key Vault.
99
95
100
96
1. To authenticate using a password from Azure Key Vault, configure the following settings.
101
97
102
-
***Connection Settings** (Standard SKU only)
98
+
***Connection Settings**: Only available for SKUs higher than the Basic SKU.
103
99
104
100
***Protocol**: Select SSH.
105
101
***Port**: Specify the port number.
@@ -113,9 +109,7 @@ Use the following steps to authenticate using a password from Azure Key Vault.
113
109
114
110
* Make sure you have **List** and **Get** access to the secrets stored in the Key Vault resource. To assign and modify access policies for your Key Vault resource, see [Assign a Key Vault access policy](../key-vault/general/assign-access-policy-portal.md).
115
111
116
-
> [!NOTE]
117
-
> Please store your SSH private key as a secret in Azure Key Vault using the **PowerShell** or **Azure CLI** experience. Storing your private key via the Azure Key Vault portal experience will interfere with the formatting and result in unsuccessful login. If you did store your private key as a secret using the portal experience and no longer have access to the original private key file, see [Update SSH key](../virtual-machines/extensions/vmaccess-linux.md#update-ssh-key) to update access to your target VM with a new SSH key pair.
118
-
>
112
+
* Store your SSH private key as a secret in Azure Key Vault using the **PowerShell** or **Azure CLI** experience. Storing your private key via the Azure Key Vault portal experience interferes with the formatting and result in unsuccessful login. If you did store your private key as a secret using the portal experience and no longer have access to the original private key file, see [Update SSH key](../virtual-machines/extensions/vmaccess-linux.md#update-ssh-key) to update access to your target VM with a new SSH key pair.
119
113
120
114
1. To work with the VM in a new browser tab, select **Open in new browser tab**.
121
115
@@ -129,7 +123,7 @@ Use the following steps to authenticate using an SSH private key from a local fi
129
123
130
124
1. To authenticate using a private key from a local file, configure the following settings.
131
125
132
-
***Connection Settings** (Standard SKU only)
126
+
***Connection Settings**: Only available for SKUs higher than the Basic SKU.
133
127
134
128
***Protocol**: Select SSH.
135
129
***Port**: Specify the port number.
@@ -150,7 +144,7 @@ Use the following steps to authenticate using a private key stored in Azure Key
150
144
151
145
1. To authenticate using a private key stored in Azure Key Vault, configure the following settings. For the Basic SKU, connection settings can't be configured and will instead use the default connection settings: SSH and port 22.
152
146
153
-
***Connection Settings** (Standard SKU only)
147
+
***Connection Settings**: Only available for SKUs higher than the Basic SKU.
154
148
155
149
***Protocol**: Select SSH.
156
150
***Port**: Specify the port number.
@@ -163,9 +157,7 @@ Use the following steps to authenticate using a private key stored in Azure Key
163
157
164
158
* Make sure you have **List** and **Get** access to the secrets stored in the Key Vault resource. To assign and modify access policies for your Key Vault resource, see [Assign a Key Vault access policy](../key-vault/general/assign-access-policy-portal.md).
165
159
166
-
> [!NOTE]
167
-
> Please store your SSH private key as a secret in Azure Key Vault using the **PowerShell** or **Azure CLI** experience. Storing your private key via the Azure Key Vault portal experience will interfere with the formatting and result in unsuccessful login. If you did store your private key as a secret using the portal experience and no longer have access to the original private key file, see [Update SSH key](../virtual-machines/extensions/vmaccess-linux.md#update-ssh-key) to update access to your target VM with a new SSH key pair.
168
-
>
160
+
* Store your SSH private key as a secret in Azure Key Vault using the **PowerShell** or **Azure CLI** experience. Storing your private key via the Azure Key Vault portal experience interferes with the formatting and result in unsuccessful login. If you did store your private key as a secret using the portal experience and no longer have access to the original private key file, see [Update SSH key](../virtual-machines/extensions/vmaccess-linux.md#update-ssh-key) to update access to your target VM with a new SSH key pair.
169
161
170
162
***Azure Key Vault Secret**: Select the Key Vault secret containing the value of your SSH private key.
0 commit comments