Loïc Grenié thanks!! Work well! I was trying to do a script exactly like your script! Thanks and again thanks! |
--- Begin Message ---
- To: Conti Stefano <conti.s@email.it>
- Cc: Debian User <debian-user@lists.debian.org>
- Subject: Re: SSH timeout logoff don't work!
- From: Loïc Grenié <loic.grenie@gmail.com>
- Date: Fri, 24 Jun 2022 09:31:43 +0200
- Message-id: <[🔎] CAMLkfFTpgYw8gYdzSmWwZc_z-O_TNXqrRW+JsbV+cPVjrvVwhw@mail.gmail.com>
- In-reply-to: <[🔎] 5bd55fc03d212df18b682a68dd35bb0324c7df44.camel@email.it>
- References: <[🔎] 5bd55fc03d212df18b682a68dd35bb0324c7df44.camel@email.it>
Hi,Le mar. 21 juin 2022 à 10:14, Conti Stefano <conti.s@email.it> a écrit :Hello! In My Debian 11 SSH timeout logoff not work! I must put in .bashrc of my user: TMOUT=600 to loogut after 10 minutes. Work, of course, but close all bash terminal!This is my sshd_config with info for timeout:TCPKeepAlive noClientAliveInterval 600ClientAliveCountMax 0Any suggest?Maybeif [ "$(ps -o comm $PPID | tail -1)" = sshd ]; then TMOUT=600; fiThis is not foolproof, but it should work if you do not abuse the system.Hope this helps,Loïc
--- End Message ---