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?
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