1 |
On Sunday 30 November 2008, Neil Bothwick wrote: |
2 |
> On Sun, 30 Nov 2008 09:48:15 +0000, Mick wrote: |
3 |
> > I've exported TMOUT=1200 to make sure an absent minded colleague does |
4 |
> > not leave his console logged in as root and walk away. |
5 |
> > |
6 |
> > This has the desired effect - except that when I am su'd in via SSH it |
7 |
> > also kicks in and logs me out midstream whatever I have been doing at |
8 |
> > the time. |
9 |
> |
10 |
> Where do you set this, in the profile/bashrc? |
11 |
|
12 |
No, only in /root/.bashrc. |
13 |
|
14 |
> You could test $SSH_TTY |
15 |
> before setting the variable, so it is not set for SSH logins. I use a |
16 |
> similar method to give a different prompt for SSH sessions. |
17 |
> |
18 |
> [[ -n "${SSH_TTY}" ]] || export TMOUT=1200 |
19 |
|
20 |
Thanks, I entered this and I think it works (not sure I spent enough time |
21 |
online to be certain). Time will tell, ha! |
22 |
-- |
23 |
Regards, |
24 |
Mick |