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
+72-54Lines changed: 72 additions & 54 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,8 @@ description: Learn how to use Azure Bastion to connect to Linux VM using SSH.
5
5
author: cherylmc
6
6
ms.service: bastion
7
7
ms.topic: how-to
8
-
ms.date: 10/18/2022
8
+
ms.date: 04/25/2023
9
9
ms.author: cherylmc
10
-
ms.custom: ignite-fall-2021
11
10
---
12
11
13
12
# Create an SSH connection to a Linux VM using Azure Bastion
@@ -16,97 +15,93 @@ This article shows you how to securely and seamlessly create an SSH connection t
16
15
17
16
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.
18
17
19
-
When connecting to a Linux virtual machine using SSH, you can use both username/password and SSH keys for authentication.
20
-
21
-
The SSH private key must be in a format that begins with `"-----BEGIN RSA PRIVATE KEY-----"` and ends with `"-----END RSA PRIVATE KEY-----"`.
18
+
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-----"`.
22
19
23
20
## Prerequisites
24
21
25
-
Make sure that you have set up an Azure Bastion host for the virtual network in which the VM resides. For more information, see [Create an Azure Bastion host](./tutorial-create-host-portal.md). Once the Bastion service is provisioned and deployed in your virtual network, you can use it to connect to any VM in this virtual network.
22
+
Make sure that you have set up an Azure Bastion host for the virtual network in which the VM resides. For more information, see [Create an Azure Bastion host](./tutorial-create-host-portal.md). Once the Bastion service is provisioned and deployed in your virtual network, you can use it to connect to any VM in this virtual network.
23
+
24
+
The connection settings and features that are available depend on the Bastion SKU you're using.
25
+
26
+
* To see the available features and settings per SKU tier, see the [SKUs and features](bastion-overview.md#sku) section of the Bastion overview article.
27
+
* To check the SKU tier of your Bastion deployment and upgrade if necessary, see [Upgrade a Bastion SKU](upgrade-sku.md).
26
28
27
29
### Required roles
28
30
29
31
In order to make a connection, the following roles are required:
30
32
31
-
* Reader role on the virtual machine
32
-
* Reader role on the NIC with private IP of the virtual machine
33
-
* Reader role on the Azure Bastion resource
34
-
* Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network)
33
+
* Reader role on the virtual machine.
34
+
* Reader role on the NIC with private IP of the virtual machine.
35
+
* Reader role on the Azure Bastion resource.
36
+
* Reader role on the virtual network of the target virtual machine (if the Bastion deployment is in a peered virtual network).
35
37
36
38
### Ports
37
39
38
40
In order to connect to the Linux VM via SSH, you must have the following ports open on your VM:
39
41
40
42
* Inbound port: SSH (22) ***or***
41
-
* Inbound port: Custom value (you'll then need to specify this custom port when you connect to the VM via Azure Bastion)
42
-
43
-
> [!NOTE]
44
-
> If you want to specify a custom port value, Azure Bastion must be configured using the Standard SKU. The Basic SKU does not allow you to specify custom ports.
45
-
>
43
+
* 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.
46
44
47
45
## Bastion connection page
48
46
49
-
1. In the [Azure portal](https://portal.azure.com), go to the virtual machine that you want to connect to. On the **Overview** page, select **Connect**, then select **Bastion** from the dropdown to open the Bastion connection page. You can also select **Bastion** from the left pane.
47
+
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.
50
48
51
-
:::image type="content" source="./media/bastion-connect-vm-ssh-linux/connect.png" alt-text="Screenshot shows the overview for a virtual machine in Azure portal with Connect selected" lightbox="./media/bastion-connect-vm-ssh-linux/connect.png":::
49
+
:::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":::
52
50
53
-
1. On the **Bastion**connection page, click the **Connection Settings** arrow to expand all the available settings. If you are using a Bastion **Standard**SKU, you have more available settings than a Basic SKU.
51
+
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.
* If you're using the **Standard** SKU, **Connection Settings** values (ports and protocols) are visible and can be configured.
56
54
57
-
1. Authenticate and connect using one of the methods in the following sections.
55
+
:::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":::
58
56
59
-
*[Username and password](#username-and-password)
60
-
*[Private key from local file](#private-key-from-local-file)
* 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.
63
58
64
-
## Username and password
59
+
:::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":::
65
60
66
-
Use the following steps to authenticate using username and password.
61
+
* To view and select an available **Authentication Type**, use the dropdown.
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.
133
151
134
-
1. To authenticate using a private key stored in Azure Key Vault, configure the following settings:
152
+
***Connection Settings** (Standard SKU only)
135
153
136
-
***Protocol**: Select SSH.
137
-
***Port**: Input the port number. Custom port connections are available for the Standard SKU only.
154
+
***Protocol**: Select SSH.
155
+
***Port**: Specify the port number.
138
156
***Authentication type**: Select **SSH Private Key from Azure Key Vault** from the dropdown.
Copy file name to clipboardExpand all lines: articles/bastion/bastion-connect-vm-ssh-windows.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ Currently, Azure Bastion only supports connecting to Windows VMs via SSH using *
59
59
60
60
1. In the [Azure portal](https://portal.azure.com), go to the virtual machine that you want to connect to. On the **Overview** page, select **Connect**, then select **Bastion** from the dropdown to open the Bastion connection page. You can also select **Bastion** from the left pane.
61
61
62
-
:::image type="content" source="./media/bastion-connect-vm-ssh-windows/connect.png" alt-text="Screenshot shows the overview for a virtual machine in Azure portal with Connect selected." lightbox="./media/bastion-connect-vm-ssh-linux/connect.png":::
62
+
:::image type="content" source="./media/bastion-connect-vm-ssh-windows/connect.png" alt-text="Screenshot shows the overview for a virtual machine in Azure portal with Connect selected." lightbox="./media/bastion-connect-vm-ssh-windows/connect.png":::
63
63
64
64
1. On the **Bastion** connection page, click the **Connection Settings** arrow to expand all the available settings. If you are using a Bastion **Standard** SKU, you have more available settings than a Basic SKU.
0 commit comments