Hi! I have to log out a user who is logged in via ssh. The information that he is not allowed to login comes from the utmp-file like the pid to kill. If he's logged in via telnet, I can do the job by killing that pid. That does not work with ssh: For some reason, all what I get out of utmp is the pid of the listening sshd which I can't kill if I don't want to disable ssh-logins.
I solved it by adding 2 to that pid to reach the child-ssh, checking if it is "sshd" and owned by the user who is to be logged out. If that all is ok, I kill that pid. Well, it works, but is that reliable and secure? Will this also work after the maximum of PID is reached? The package I am talking about is timeoutd. (No bug for that) Dennis