On OS X 10.8 I deleted a user account which had Remote Login permissions. Now, in the Sharing tab of System Preferences, that user shows up as "Unknown User", and clicking the minus button won't remove it.
Found the solution here, hope this helps.
1) First remove all users that can be removed from GUI In System Preferences -> Sharing -> Remote login
2) Run the below command which shows the configuration of users who have remote login access
3) remove the group GroupMembers that the user(Unknown User) is in
4) Go to System preferences and see the result
Expanding upon Kent's comment, if you prefer a graphical user interface:
In the Users & Groups pane of System Preferences, click Login Options.
If the Edit… button is greyed out, then click the lock to make changes.
Edit… > Open Directory Utility…
With Directory Utility
Click Directory Editor, then view Users in the /Local/Default node:
If you find debris that relates to the previously deleted user
You can authenticate and use Directory Utility to delete that debris.
If you find no such debris
There may be an issue with a configuration file …