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/app-service/configure-linux-open-ssh-session.md
+30-22Lines changed: 30 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
---
2
2
title: SSH Access for Linux and Windows Containers
3
-
description: You can open an SSH session to a Linux or a Windows container in Azure App Service. Custom Linux containers are supported with some modifications to your custom image. Custom Windows containers require no modifications to your custom image.
3
+
description: Learn how to open an SSH session to a Linux or a Windows container in Azure App Service. Custom Linux containers are supported with some modifications to your custom image.
4
4
keywords: azure app service, web app, linux, windows, oss
[Secure Shell (SSH)](https://wikipedia.org/wiki/Secure_Shell) can be used to execute administrative commands remotely to a container. App Service provides SSH support directly into an app hosted in a Windows custom container.
23
23
24
-
Windows custom containers don't require any special settings for the [browser SSH session](#open-ssh-session-in-browser) to work. SSH sessions through Azure CLI are not supported.
25
-
26
-

24
+
Windows custom containers don't require any special settings for the [browser SSH session](#open-ssh-session-in-browser) to work.
27
25
28
26
::: zone-end
29
27
30
28
::: zone pivot="container-linux"
31
29
32
30
[Secure Shell (SSH)](https://wikipedia.org/wiki/Secure_Shell) can be used to execute administrative commands remotely to a container. App Service provides SSH support directly into an app hosted in a Linux container (built-in or custom).
33
31
34
-
The built-in Linux containers already have the necessary configuration to enable SSH sessions. Linux custom containers require additional configurations to enable SSH sessions. See [Enable SSH](configure-custom-container.md?pivots=container-linux#enable-ssh).
32
+
The built-in Linux containers already have the necessary configuration to enable SSH sessions. Linux custom containers require additional configurations to enable SSH sessions. To learn more, see [Enable SSH](configure-custom-container.md?pivots=container-linux#enable-ssh).
33
+
34
+
::: zone-end
35
+
36
+
:::image type="content" source="./media/configure-linux-open-ssh-session/app-service-ssh.png" alt-text="Screenshot that shows the App Service SSH.":::
37
+
38
+
::: zone pivot="container-windows"
39
+
40
+
SSH sessions through the Azure CLI aren't supported for Windows App Service plans. Only Linux App Service plans are supported.
35
41
36
-

42
+
::: zone-end
43
+
44
+
::: zone pivot="container-linux"
37
45
38
-
You can also connect to the container directly from your local development machine using SSH and SFTP.
46
+
You can also connect to the container directly from your local development machine by using SSH and SFTP.
39
47
40
48
::: zone-end
41
49
@@ -45,23 +53,23 @@ You can also connect to the container directly from your local development machi
45
53
46
54
::: zone pivot="container-linux"
47
55
48
-
## Open SSH session with Azure CLI
56
+
## Open SSH session with the Azure CLI
49
57
50
-
Using TCP tunneling you can create a network connection between your development machine and Linux containers over an authenticated WebSocket connection. It enables you to open an SSH session with your container running in App Service from the client of your choice.
58
+
By using TCP tunneling, you can create a network connection between your development machine and Linux containers over an authenticated WebSocket connection. You can then open an SSH session with your container running in App Service from the client of your choice.
51
59
52
-
To get started, you need to install [Azure CLI](/cli/azure/install-azure-cli). To see how it works without installing Azure CLI, open [Azure Cloud Shell](../cloud-shell/overview.md).
60
+
To get started, you need to install the [Azure CLI](/cli/azure/install-azure-cli). To see how it works without installing the Azure CLI, open [Azure Cloud Shell](../cloud-shell/overview.md).
53
61
54
-
Open a remote connection to your app using the [az webapp create-remote-connection](/cli/azure/webapp#az-webapp-create-remote-connection) command. Specify _\<subscription-id>_, _\<group-name>_ and _\<app-name>_ for your app.
62
+
Open a remote connection to your app by using the [az webapp create-remote-connection](/cli/azure/webapp#az-webapp-create-remote-connection) command. Specify _\<subscription-id>_, _\<resource-group-name>_, and _\<app-name>_ for your app.
55
63
56
64
```azurecli-interactive
57
65
az webapp create-remote-connection --subscription <subscription-id> --resource-group <resource-group-name> -n <app-name> &
58
66
```
59
67
60
68
> [!TIP]
61
-
> `&` at the end of the command is just for convenience if you are using Cloud Shell. It runs the process in the background so that you can run the next command in the same shell.
69
+
> `&` at the end of the command is just for convenience if you're using Cloud Shell. It runs the process in the background so that you can run the next command in the same shell.
62
70
63
71
> [!NOTE]
64
-
> If this command fails, make sure [remote debugging](https://medium.com/@auchenberg/introducing-remote-debugging-of-node-js-apps-on-azure-app-service-from-vs-code-in-public-preview-9b8d83a6e1f0) is *disabled*with the following command:
72
+
> If this command fails, make sure [remote debugging](https://medium.com/@auchenberg/introducing-remote-debugging-of-node-js-apps-on-azure-app-service-from-vs-code-in-public-preview-9b8d83a6e1f0) is *disabled*by using the following command:
65
73
>
66
74
> ```azurecli-interactive
67
75
> az webapp config set --resource-group <resource-group-name> -n <app-name> --remote-debugging-enabled=false
@@ -78,26 +86,26 @@ SSH is available { username: root, password: Docker! }
78
86
Ctrl + C to close
79
87
```
80
88
81
-
Open an SSH session with your container with the client of your choice, using the local port provided in the output (`<port-output>`). For example, with the linux[ssh](https://ss64.com/bash/ssh.html) command, you can run a single command like `java -version`:
89
+
Open an SSH session with your container using the client of your choice, through the local port provided in the output (`<port-output>`). For example, with the Linux[ssh](https://ss64.com/bash/ssh.html) command, you can run a single command like `java -version`:
Once you're authenticated, you should see the session welcome screen.
108
+
After you're authenticated, you should see the session welcome screen.
101
109
102
110
<pre>
103
111
_____
@@ -111,9 +119,9 @@ A P P S E R V I C E O N L I N U X
111
119
0e690efa93e2:~#
112
120
</pre>
113
121
114
-
You are now connected to your connector.
122
+
You're now connected to your connector.
115
123
116
-
Try running the [top](https://ss64.com/bash/top.html) command. You should be able to see your app's process in the process list. In the example output below, it's the one with `PID 263`.
124
+
Try running the [top](https://ss64.com/bash/top.html) command. You should be able to see your app's process in the process list. In the example output, it's the one with `PID 263`.
You can post questions and concerns on the [Azure forum](/answers/tags/436/azure-app-service).
145
153
146
-
For more information on Web App for Containers, see:
154
+
To learn more about App Service for containers, see:
147
155
148
156
*[Introducing remote debugging of Node.js apps on Azure App Service from VS Code](https://medium.com/@auchenberg/introducing-remote-debugging-of-node-js-apps-on-azure-app-service-from-vs-code-in-public-preview-9b8d83a6e1f0)
149
157
*[Quickstart: Run a custom container on App Service](quickstart-custom-container.md?pivots=container-linux)
150
-
*[Azure App Service Web App for Containers FAQ](faq-app-service-linux.yml)
158
+
*[Azure App Service on Linux FAQ](faq-app-service-linux.yml)
0 commit comments