---
title: SSH Sessions Duration-Based Limitation Settings
slug: reference-guide-3-0-0/ssh-sessions-duration-based-limitation-settings
description: Learn how to limit user session duration in the nssoapp service with this helpful document. Follow step-by-step instructions to set a time limit, add a property, and make changes to the nsso.properties file. Discover how to configure a warning message bef
docTags: 
createdAt: 2022-07-27T13:03:12.000Z
---

User sessions’ duration can be limited. This property is controlled by a file under the nssoapp service. To set a time limit:

1. Navigate to **Device Groups**.
2. Right-click the desired Device Group, and select **Show propertie**s.
3. Add the “sessionDurationLimitMinute” property with the value in minutes
4. Establish an SSH connection to the Single Connect server
5. Set the required parameters in “/u01/nssoapp/conf/nsso.properties” using the commands:
   cd /u01/nssoapp/conf/                                                                                                                                vi nsso.properties
6. Add/edit the following parameter with the vi editor.
   **nsso.cli.session.duration.limit.warning.before.sec=30** (the warning message for session termination before the time limit is reached. If the value is 30, the warning message will be shown 60 seconds before session termination. The value can be changed as desired.)

::Image[]{src="https://api.archbee.com/api/optimize/g9cApVza9NIhSh0pjZYtA/1Z6TaLXulMhcMcdVCc-jH_image.png" size="62" width="668" height="97" caption="Duration Based Restriction" position="center" showCaption="true"}

- Once the parameters are set, save, and exit the vi editor and restart the nssoapp with the command:
  systemctl restart nssoapp
