|
| 1 | +--- |
| 2 | +title: "Azure Operator Nexus: How to restrict serial port access and set time-out on terminal server" |
| 3 | +description: Process of configuring serial port access restrictions and time-out settings on terminal server |
| 4 | +author: sushantjrao |
| 5 | +ms.author: sushrao |
| 6 | +ms.service: azure-operator-nexus |
| 7 | +ms.topic: how-to |
| 8 | +ms.date: 02/26/2025 |
| 9 | +ms.custom: template-how-to, devx-track-azurecli |
| 10 | +--- |
| 11 | + |
| 12 | +# How to restrict serial port access to a single session and set a 15-Minute time-out on a Terminal Server |
| 13 | + |
| 14 | +This guide explains how to configure a Terminal Server to restrict serial port access to a single session and set the default time-out to 15 minutes. |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +The Terminal Server must run OS version 24.11.2 or a later version.<br> |
| 19 | +For upgrade instructions, refer to [How to Upgrade Terminal Server OS](howto-upgrade-os-of-terminal-server.md). |
| 20 | + |
| 21 | +>[!Note] |
| 22 | +> This guide has been validated with Opengear firmware version 24.11.2, which was upgraded from version 22.06.0, and is supported with Nexus Network Fabric runtime version 5.0.0. |
| 23 | +
|
| 24 | +## Step 1: Set time-out for sessions |
| 25 | + |
| 26 | +Configure the session time-outs for CLI, WebUI, and Serial Port access using the following commands: |
| 27 | + |
| 28 | +```bash |
| 29 | +sudo ogcli update system/cli_session_timeout timeout=15 |
| 30 | +sudo ogcli update system/webui_session_timeout timeout=15 |
| 31 | +sudo ogcli update system/session_timeout serial_port_timeout=15 |
| 32 | +``` |
| 33 | + |
| 34 | +## Step 2: Verify time-out settings |
| 35 | + |
| 36 | +Confirm the new time-out settings by running: |
| 37 | + |
| 38 | +```bash |
| 39 | +sudo ogcli get system/session_timeout |
| 40 | +``` |
| 41 | + |
| 42 | +```Expected output: |
| 43 | +cli_timeout=15 |
| 44 | +serial_port_timeout=15 |
| 45 | +webui_timeout=15 |
| 46 | +``` |
| 47 | + |
| 48 | +## Step 3: Configure single serial port session |
| 49 | + |
| 50 | +To restrict each serial port to a single session, execute the following command. |
| 51 | + |
| 52 | +```bash |
| 53 | +for i in {01..48} ; do |
| 54 | + echo "### Configuring single_session on port$i ###" |
| 55 | + ogcli update port port$i single_session=true |
| 56 | +done |
| 57 | +``` |
| 58 | + |
| 59 | +>[!Note] |
| 60 | +> This process may take approximately 15 minutes. |
| 61 | +
|
| 62 | +## Step 4: Verify single session configuration |
| 63 | + |
| 64 | +Validate the configuration by listing the ports and checking the `single_session` status: |
| 65 | + |
| 66 | +```bash |
| 67 | +sudo ogcli get ports | grep -E 'ogcli get port|single_session' |
| 68 | +``` |
| 69 | + |
| 70 | +Alternatively, check individual ports: |
| 71 | + |
| 72 | +```bash |
| 73 | +sudo ogcli get port "port01" |
| 74 | +``` |
| 75 | + |
| 76 | +```Expected output for each port: |
| 77 | +single_session=true |
| 78 | +``` |
| 79 | + |
| 80 | +Repeat the command for other ports as needed (`port02`, `port03`, etc.). |
0 commit comments