---
title: SSH Sessions Duration-Based Limitation Settings
slug: kronpam-reference-guide-3-9-0/ssh-sessions-duration-based-limitation-settings
description: Learn how to limit user session durations with this helpful document. Discover the step-by-step process of setting time limits, including navigating to Device Groups, making changes in the nsso.properties file, and establishing an SSH connection. Find out
docTags: 
createdAt: 2022-07-27T13:03:12.000Z
---

User session duration can be limited. This property is controlled by a file under the SSH proxy service.&#x20;

To set a time limit:

1. Navigate to **Devices > Inventory.**
2. Click the desired **Device Group** options, then click th&#x65;**&#x20;Edit** button.
3. Click th&#x65;**&#x20;Next&#x20;**&#x62;utton to display the **Properties** section.
4. Add the **sessionDurationLimitMinute** property with the value in minutes under**Custom Properties.**
5. Establish an SSH connection to the Kron PAM server.
6. Set the required parameters in **/pam/ssh/conf/nsso.properties&#x20;**&#x75;sing the commands:
   `cd /pam/ssh/conf/   `****
   `vi nsso.properties`
7. Add/edit the following parameter with the vi editor.
   **nsso.cli.session.duration.limit.warning.before.sec=30&#x20;**(the warning message for session termination before the time limit is reached. If the value is 60, the warning message will be shown 30 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&#x20;
  `systemctl restart pam-ssh.service`

