Skip to content

Commit c275670

Browse files
authored
Merge pull request #293669 from cephalin/java-version
add java version details
2 parents df67dde + 5549dd3 commit c275670

File tree

3 files changed

+69
-21
lines changed

3 files changed

+69
-21
lines changed

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

Lines changed: 40 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,45 @@ 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+
### Get Java version in Linux container
38+
39+
For more detailed version information in the 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.
40+
41+
::: zone pivot="java-javase,java-tomcat,java-jboss"
42+
43+
To view the Java version in the SSH session:
44+
45+
```bash
46+
java -version
47+
```
48+
49+
::: zone-end
50+
51+
::: zone pivot="java-tomcat"
52+
53+
To view the Tomcat server version in the SSH session:
54+
55+
```bash
56+
sh /usr/local/tomcat/version.sh
57+
```
58+
59+
Or, if your Tomcat server is in a custom location, find `version.sh` with:
60+
61+
```bash
62+
find / -name "version.sh"
63+
```
64+
65+
::: zone-end
66+
67+
::: zone pivot="java-jboss"
68+
69+
To view the JBoss server version in the SSH session:
70+
```bash
71+
$JBOSS_HOME/bin/jboss-cli.sh --connect --commands=:product-info
72+
```
73+
74+
::: zone-end
75+
3776
# [Windows](#tab/windows)
3877

3978
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: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,46 +6,46 @@ 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.
17-
1816
::: zone pivot="container-windows"
1917

20-
## Open SSH session in browser
18+
[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.
2119

22-
[!INCLUDE [Open SSH session in browser](../../includes/app-service-web-ssh-connect-no-h.md)]
20+
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.
21+
22+
![Linux App Service SSH](./media/configure-linux-open-ssh-session/app-service-linux-ssh.png)
2323

2424
::: zone-end
2525

2626
::: zone pivot="container-linux"
2727

28+
[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).
29+
30+
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).
31+
2832
![Linux App Service SSH](./media/configure-linux-open-ssh-session/app-service-linux-ssh.png)
2933

3034
You can also connect to the container directly from your local development machine using SSH and SFTP.
3135

36+
::: zone-end
37+
3238
## Open SSH session in browser
3339

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

36-
## Use SSH support with custom Docker images
37-
38-
See [Configure SSH in a custom container](configure-custom-container.md#enable-ssh).
39-
40-
## Open SSH session from remote shell
42+
::: zone pivot="container-linux"
4143

42-
> [!NOTE]
43-
> This feature is currently in Preview.
44-
>
44+
## Open SSH session with Azure CLI
4545

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.
46+
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.
4747

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).
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).
4949

5050
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.
5151

@@ -66,15 +66,24 @@ az webapp create-remote-connection --subscription <subscription-id> --resource-g
6666
The command output gives you the information you need to open an SSH session.
6767
6868
```output
69-
Port 21382 is open
69+
Verifying if app is running....
70+
App is running. Trying to establish tunnel connection...
71+
Opening tunnel on addr: 127.0.0.1
72+
Opening tunnel on port: <port-output>
7073
SSH is available { username: root, password: Docker! }
71-
Start your favorite client and connect to port 21382
74+
Ctrl + C to close
7275
```
7376
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:
77+
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`:
78+
79+
```bash
80+
ssh [email protected] -m hmac-sha1 -p <port-output> java -version
81+
```
82+
83+
Or, to enter a full SSH session, just run:
7584

7685
```bash
77-
ssh [email protected] -p <port>
86+
ssh [email protected] -m hmac-sha1 -p <port-output>
7887
```
7988

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

includes/app-service-web-ssh-connect-builtin-no-h.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ ms.custom: "include file"
1616
> Any changes you make outside the */home* directory are stored in the container itself and don't persist beyond an app restart.
1717
>
1818
19-
To open a remote SSH session from your local machine, see [Open SSH session from remote shell](../articles/app-service/configure-linux-open-ssh-session.md#open-ssh-session-from-remote-shell).
19+
To open a remote SSH session from your local machine, see [Open SSH session from remote shell](../articles/app-service/configure-linux-open-ssh-session.md#open-ssh-session-with-azure-cli).

0 commit comments

Comments
 (0)