LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   logging off remotely (https://www.linuxquestions.org/questions/linux-security-4/logging-off-remotely-207002/)

ceph 07-19-2004 12:52 PM

logging off remotely
 
I was wondering if there was anyway to log off another user on my machine remotely. I'm usually connected to my machine from work via ssh, and see that someone has logged in and left. I know you can set a timeout to do it, but I don't want to interrupt a download they might be doing, or a project they may be working on.

thanks
ryan

osvaldomarques 07-20-2004 12:31 AM

Every user when logged gets a pseudo terminal. If you enter
Code:

who
mauricio pts/0    Jul 19 18:37
root    pts/1    Jul 19 18:39
root    pts/2    Jul 19 21:00
osvaldo  pts/5    Jul 20 02:19 (Modelo)

you will see who is logged on your machine. If you enter
Code:

ps t pts/5
  PID TTY      STAT  TIME COMMAND
15776 pts/5    S      0:00 -bash

you will see the programs executing in this pseudo terminal. All you have to do is
Code:

kill -HUP <pid>
of the sessions you want to log off. See the who gives the remote machine from where came the connection.

I hope this helps


All times are GMT -5. The time now is 02:59 AM.