• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

Solaris : How to setup session idle timeout for ssh

by admin

Question: Is it possible to setup a timeout for idle sessions in Solaris 10 ssh to automatically close an ssh session after a specified idle time?

Answer:

You can setup an idle timer on the ssh server side and this would be active for all users. There is no option to control this for individual users or on the client side.

If you want to enable such an idle timeout then you have to edit the file /etc/ssh/sshd_config and set the value of ClientAliveCountMax to 0 and the value of ClientAliveInterval to the desired timeout in seconds.

An example setup to configure a 30 minutes idle timeout would be :

# vi /etc/ssh/sshd_config
.....
ClientAliveCountMax 0
ClientAliveInterval 1800
.....

Note that the setting of KeepAlive should be the default (yes) to activate these timeouts. The ssh service needs to be restarted to activate the new setting:

# svcadm restart ssh

Filed Under: Solaris

Some more articles you might also be interested in …

  1. Solaris Snoop : 15 Awesome practical examples for packet sniffing
  2. How to prevent non-root user from creating crontab entry
  3. How to setup a chroot ssh/sftp for specific users in Solaris 10
  4. How to enable XDMCP in GNOME Display Manager (gdm) for Solaris 10,11
  5. How to save sar reports longer than 7 days in Solaris
  6. Oracle VM Server for SPARC (Ldoms) : How to Change Primary/Control Domain’s UUID
  7. How to enable Solaris multipathing (MPxIO or STMS) for EMC Symmetrix LUNs
  8. How to configure additional IP address on the same interface in solaris zones
  9. How to configure passwordless ssh in Solaris
  10. Complete Hardware Reference : SPARC T3-1 / T3-2 / T3-4

You May Also Like

Primary Sidebar

Recent Posts

  • qm Command Examples in Linux
  • qm wait Command Examples in Linux
  • qm start Command Examples in Linux
  • qm snapshot Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright