http://www.remotemacserver.com/?p=41
On your client open up Terminal (OS X or Linux) or use PuTTy (Windows), login to your server and perform the following commands:
ps auxwww|grep loginwindow
This should give you an an output like this:
root 925 0.0 0.1 2503556 5580 ?? Us 3:05AM 0:00.08 /System/Library/CoreServices/loginwindow.app/Contents/MacOS/loginwindow console
jc 953 0.0 0.0 2425708 276 s000 R+ 3:05AM 0:00.00 grep loginwindowYou may have a few different lines, but essentially you’re looking for the root line, the process id in my case is 925. Now that we have the process ID we will want to issue the kill -9 command and it would look like this:
sudo kill -9 953