nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

timer for logging out from PuTTy

This is a discussion on timer for logging out from PuTTy within the Shell scripting forums, part of the Development/Scripting category; hey all, Is there a way to set a timer that after x minutes/hours to log out from PuTTy by ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 08-14-2008, 06:03 PM
Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 42
Rep Power: 0
eawedat is on a distinguished road
Post timer for logging out from PuTTy

hey all,
Is there a way to set a timer that after x minutes/hours to log out from PuTTy by the command "logout" ?

thanks.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-15-2008, 06:12 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

Yes, you need to set TMOUT variable

Linux logged out a user automatically
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 08-15-2008, 07:25 PM
Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 42
Rep Power: 0
eawedat is on a distinguished road
Cool hey

hey rockdalinux
thanks for trying to help!

i have edited the file /etc/bashrc
and searched for the word by --> :/TMOUT
Pattern not found :TMOUT

And the second thing i am not root--(normal user),, i wish to apply this logout on-my-self!


thanks again.
Reply With Quote
  #4 (permalink)  
Old 08-16-2008, 04:28 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,061
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You need to append TMOUT=300. This will set for all users. I suggest add something as follows to your ~/.bash_profile or ~/.bashrc
Code:
echo 'export TMOUT=300' >> ~/.bash_profile
Now logout and login again.

300 seconds == 5 minuets to auto logout.
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #5 (permalink)  
Old 08-16-2008, 05:15 AM
Member
User
 
Join Date: May 2008
My distro: Debian
Posts: 42
Rep Power: 0
eawedat is on a distinguished road
Default

thx smart-brain
Reply With Quote
Reply

Bookmarks

Tags
.bashrc , /etc/profile , bash , shell , shell auto logout , tmout


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Inactivity timer for lighttpd petu Web servers 0 03-11-2008 01:49 PM
Logging File Accesses madz Shell scripting 2 11-08-2006 02:54 AM
Download with timer? marinm Shell scripting 6 01-23-2006 12:53 AM
MRTG stops logging nathan86 Linux software 12 03-23-2005 08:14 PM
FreeBSD putty home key problem chiku All about FreeBSD/OpenBSD/NetBSD 2 02-03-2005 06:10 PM


All times are GMT +5.5. The time now is 02:03 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36