Skip to content

Commit 5d8c68f

Browse files
committed
add java version details
1 parent 054bc0a commit 5d8c68f

File tree

2 files changed

+63
-25
lines changed

2 files changed

+63
-25
lines changed

articles/app-service/configure-language-java-deploy-run.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to deploy Tomcat, JBoss, or Java SE apps to run on Azure
44
keywords: azure app service, web app, windows, oss, java, tomcat, jboss, spring boot, quarkus
55
ms.devlang: java
66
ms.topic: article
7-
ms.date: 07/17/2024
7+
ms.date: 01/28/2025
88
ms.custom: devx-track-java, devx-track-azurecli, devx-track-extended-java, linux-related-content
99
zone_pivot_groups: app-service-java-hosting
1010
adobe-target: true
@@ -34,6 +34,43 @@ To show all supported Java versions, run the following command in the [Cloud She
3434
az webapp list-runtimes --os linux | grep "JAVA\|TOMCAT\|JBOSSEAP"
3535
```
3636

37+
For more detailed version information in your Linux container, [open an SSH session with the container](configure-linux-open-ssh-session.md?pivots=container-linux). Here are a few examples of what you can run.
38+
39+
::: zone pivot="java-javase,java-tomcat,java-jboss"
40+
41+
To view the Java version:
42+
43+
```bash
44+
java -version
45+
```
46+
47+
::: zone-end
48+
49+
::: zone pivot="java-tomcat"
50+
51+
To view the Tomcat server version:
52+
53+
```bash
54+
sh /usr/local/tomcat/version.sh
55+
```
56+
57+
Or, if your Tomcat server is in a custom location, find `version.sh` with:
58+
59+
```bash
60+
find / -name "version.sh"
61+
```
62+
63+
::: zone-end
64+
65+
::: zone pivot="java-jboss"
66+
67+
To view the JBoss server version:
68+
```bash
69+
$JBOSS_HOME/bin/jboss-cli.sh --connect --commands=:product-info
70+
```
71+
72+
::: zone-end
73+
3774
# [Windows](#tab/windows)
3875

3976
To show the current Java version, run the following command in the [Cloud Shell](https://shell.azure.com):

articles/app-service/configure-linux-open-ssh-session.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,38 @@ author: msangapu-msft
66

77
ms.assetid: 66f9988f-8ffa-414a-9137-3a9b15a5573c
88
ms.topic: article
9-
ms.date: 10/13/2023
9+
ms.date: 01/28/2025
1010
ms.author: msangapu
1111
ms.custom: devx-track-azurecli, linux-related-content
1212
zone_pivot_groups: app-service-containers-windows-linux
1313
---
1414
# Open an SSH session to a container in Azure App Service
1515

16-
[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 direct into an app hosted in a Container.
16+
[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 container (built-in or custom).
1717

18-
::: zone pivot="container-windows"
18+
- The built-in, stack-specific Linux containers already have the necessary configuration to enable SSH sessions.
19+
- Windows custom containers don't require any special settings for the [browser SSH session](#open-ssh-session-in-browser) to work. It doesn't support SSH sessions through Azure CLI.
20+
- Linux custom containers require additional configurations to enable SSH sessions. See [Enable SSH](configure-custom-container.md&pivots=container-linux#enable-ssh).
1921

20-
## Open SSH session in browser
21-
22-
[!INCLUDE [Open SSH session in browser](../../includes/app-service-web-ssh-connect-no-h.md)]
23-
24-
::: zone-end
22+
![Linux App Service SSH](./media/configure-linux-open-ssh-session/app-service-linux-ssh.png)
2523

2624
::: zone pivot="container-linux"
2725

28-
![Linux App Service SSH](./media/configure-linux-open-ssh-session/app-service-linux-ssh.png)
29-
3026
You can also connect to the container directly from your local development machine using SSH and SFTP.
3127

28+
::: zone-end
29+
3230
## Open SSH session in browser
3331

3432
[!INCLUDE [Open SSH session in browser](../../includes/app-service-web-ssh-connect-no-h.md)]
3533

36-
## Use SSH support with custom Docker images
37-
38-
See [Configure SSH in a custom container](configure-custom-container.md#enable-ssh).
34+
::: zone pivot="container-linux"
3935

40-
## Open SSH session from remote shell
36+
## Open SSH session with Azure CLI
4137

42-
> [!NOTE]
43-
> This feature is currently in Preview.
44-
>
38+
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.
4539

46-
Using TCP tunneling you can create a network connection between your development machine and Web App for 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.
47-
48-
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).
40+
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).
4941

5042
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.
5143

@@ -66,15 +58,24 @@ az webapp create-remote-connection --subscription <subscription-id> --resource-g
6658
The command output gives you the information you need to open an SSH session.
6759
6860
```output
69-
Port 21382 is open
61+
Verifying if app is running....
62+
App is running. Trying to establish tunnel connection...
63+
Opening tunnel on addr: 127.0.0.1
64+
Opening tunnel on port: <port-output>
7065
SSH is available { username: root, password: Docker! }
71-
Start your favorite client and connect to port 21382
66+
Ctrl + C to close
7267
```
7368
74-
Open an SSH session with your container with the client of your choice, using the local port. The following example uses the default [ssh](https://ss64.com/bash/ssh.html) command:
69+
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`:
70+
71+
```bash
72+
ssh [email protected] -m hmac-sha1 -p <port-output> java -version
73+
```
74+
75+
Or, to enter a full SSH session, just run:
7576

7677
```bash
77-
ssh [email protected] -p <port>
78+
ssh [email protected] -m hmac-sha1 -p <port-output>
7879
```
7980

8081
When being prompted, type `yes` to continue connecting. You are then prompted for the password. Use `Docker!`, which was shown to you earlier.

0 commit comments

Comments
 (0)