Close UNIX terminal

Hi,

In one of the circumstances, my manager asked my password and opened unix terminal (Putty) with my user credentials. Its been more than 2 days that terminal is opened (saw it through finger command). How do I close that terminal which is not opened in my pc. I'm very uncomfortable of the putty session opened with my user credentials in my manager's pc.

Please no advices of giving my password to my manager. I have already done it. So please let me know if there is a way to close it from pc as the putty session is opened with my user id and passwords.

Log in and kill the session/process. As it will be your user name, you don't even need root privileges.

Login to the system where he has logged on as you and kill the process.

@ RudiC. I want to just kill the session. I cannot go to his cube and kill it. I just want to kill it without his intervention or going to his desk. How do I recognise from my putty session about the session that he opened in his pc and kill it.

@blackrageous. He logged into his system. I cannot go to his cube and do it.

He has very little knowledge in Unix and I do not want any mess with my login credentials.

You are not going to his cube. You log in to the target system, and then look for the PID of his session, and kill that.
Or, why don't you ask him to close it from his PC?

1 Like

You could in the future have your terminal time out after lets say 20min of inactivity and the server would log him off. This way you will not have to do anything.

1 Like

How would I do the time out. Is there any command.

I have this implemented on the Sarbox systems under my charge.

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

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

This works for only current Putty Session. How about already opened Putty Session

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.

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

Thanks all guys for the help.
I used finger to get the terminal session and compared it with ps -ef command. and killed it.