Close UNIX terminal


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Close UNIX terminal
# 8  
Old 10-03-2013
I have this implemented on the Sarbox systems under my charge.

Add the following to the global profile (/etc/profile):

Code:
TMOUT=300        # time in seconds to expire the connection
readonly TMOUT   # makes the variable read-only
export TMOUT      # export it

This User Gave Thanks to in2nix4life For This Post:
# 9  
Old 10-03-2013
Quote:
Originally Posted by in2nix4life
I have this implemented on the Sarbox systems under my charge.

Add the following to the global profile (/etc/profile):

Code:
TMOUT=300        # time in seconds to expire the connection
readonly TMOUT   # makes the variable read-only
export TMOUT      # export it

This works for only current Putty Session. How about already opened Putty Session
# 10  
Old 10-03-2013
That'll only work for any new sessions opened after it has been added to the /etc/profiles file. For current connections, you're better doing what was already suggested; kill the process for that connection.
# 11  
Old 10-03-2013
You can't do that right now because the change would not take effect until the next login.
Basically you need to make a change to your profile or to ssh setup.
Links to what I'm taking about.
Linux / UNIX Automatically Log BASH / TCSH / SSH Users Out After a Period of Inactivity
Session timeout setting in server
# 12  
Old 10-04-2013
Thanks all guys for the help.
I used finger to get the terminal session and compared it with ps -ef command. and killed it.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Terminal running bash/rsync script does not close with exit (MacOS High SIerra)

Hello, I am running a bash script to do an rsync back on a computer running MacOS High Sierra. This is the script I am using, #!/bin/bash # main backup location, trailing slash included backup_loc="/Volumes/Archive_Volume/00_macos_backup/" # generic backup function function backup {... (12 Replies)
Discussion started by: LMHmedchem
12 Replies

2. Post Here to Contact Site Administrators and Moderators

Cant close UNIX.com account

Hi, Can someone point me in the direction of the "close account" or "delete account" page, as i no longer want my account. I have sent 2 messages to the webmaster who has just ignored my message, and there is no advice in the faq and googling brings no answer. I want to remove my account... (1 Reply)
Discussion started by: Fanny Zoddar
1 Replies

3. UNIX for Advanced & Expert Users

close a mac terminal

Is there a trick to closing a mac terminal with a command? I would think you could just type exit into your terminal but that doesn't work. I also tried quit and close just for the hell of it and that didn't work either. Does anyone know what the command is? (1 Reply)
Discussion started by: cokedude
1 Replies

4. Shell Programming and Scripting

script does not close terminal after running

For a small script i want it so that the terminal closes when the script has completed its tasks. To do so i use at the end if the script the following: echo "Hello, World!" echo "Knowledge is power." echo "" echo "shutting down terminal in 10 seconds" exit 10 however the terminal stay's... (3 Replies)
Discussion started by: Ditzyken
3 Replies

5. AIX

How to close a unix port

I have an issue with port 7331 on our Unix box that is hung, It is stuck in a listen status: ukh-o2-jcaps1:/tstjcaps6/apptest2> netstat -a|grep 7331 tcp4 1019 0 ukh-o2-jcaps1.7331 10.230.6.7.59010 CLOSE_WAIT tcp4 1019 0 ukh-o2-jcaps1.7331 10.230.6.7.59215 ... (7 Replies)
Discussion started by: mrn6430
7 Replies

6. Programming

when parent process close, how to close the child?

can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies

7. AIX

User cant log in (close terminal)

Hello everyone I have a user on my server, Aix 5.3 TL9 sp4. Weeks ago I dont have a problem but today the user cannot log in. let me explain. Me with root user I can change his password. then I log in with the user and I can change the password and the terminal close. Im using ssh. But... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

8. UNIX for Dummies Questions & Answers

Should a UNIX daemon process close open fds?

I have a UNIX daemon process that's been started by a parent process, an application server. The behavior of this daemon process is to inherit and use the app server's file descriptors (ports/sockets). When I shutdown the app server, the daemon continues to run, because there may be other... (1 Reply)
Discussion started by: kunalashar
1 Replies

9. UNIX for Advanced & Expert Users

connecting to unix through hyper terminal - as a dumb terminal

I just changed from windows NT to XP and I am no longer able to connect to my unix system. I used to use hyper terminal -- which acts as dumb terminal to my main frame unix system. I think one of the options used to be "direct to comX". This option isn't listed now. I use a serial port and the... (2 Replies)
Discussion started by: michelle
2 Replies
Login or Register to Ask a Question