You can automatically disconnect the session based on the risk of using a command. In case of emergency access, the session is disconnected automatically based on the expiry time that is specified for emergency access.
NOTE:An SSH relay session cannot be disconnected automatically.