Originally posted by paulboy
Doesn't seem to work. I however did get the PID using Top command to get the ssh PID and typed kill PID. It killed the terminal on my win2000 machine I was using to log onto my mac. I typed who on my mac but said it was still logged in. Any ideas? I just want to boot him off. I wish I could type in disconnect user or something.
Heh, disconnect which instance of the user? Please, remember that every session attached to a controlling terminal is an instance of a user (e.g. if I have three terminals open, I am logged in three times). So, which one of me do you want to disconnect? All of me?
It is doable, by killing the process group, or revoking the controlling terminal; both approaches require knowledge of the pty.
BTW, who entries are not real-time; they depend on login or terminal to update the entries. Therefore, killing the terminal will result in utmp (i.e. who) entry not updated, with user apparently still logged in.