Using the Terminal Server Console
Remote administration is the name of the game for the independant contractor. In a past life I did system administration for a living, and programming as a hobby. Now the situation is reversed, except System Administration is a boring hobby.
But at least with good tools, I can participate this odd hobby in the comfort of my own home.
SSH makes Remote administration of linux/Unix servers remarkably easy. Unfortunately Windows 2k/2k3 requires a GUI for Remote administration, but Microsoft generosity has alloted two Terminal Server Clients for remote administration purposes on every Windows 2000 and Windows 2003 Server they sell. Unfortunately, sometimes you get disconnected unintentionally. If this happens twice, you could get the dreaded “The terminal server has exceeded the maximum number of allowed connections” error.
Now, you can’t even connect to disconnect the old sessions. You’re screwed, and you need to drive an hour to the server and get to the machine and kill the inactive sessions.
Not really, you can just:
start | run - mstsc -v:10.10.10.10 /f -console
This attaches you to the special “console” session, which kicks whoever is logged in locally off and allows you to remote control the machine again. You can then kill the inactive sessions and move on with your life. Always kill the inactive sessions first, because if you get disconnected again you will have to drive in.
Since I normally run Linux at home, I don’t use the above command, I use:
rdesktop -0
I also have a shiny new MacBook which isn’t always booted into Ubuntu Linux, sometimes it actually runs Mac OS X. Have no fear I can use the Remote Desktop Client to connect to the console session:
No fancy command line option here, but you can hold down the command (open apple) key and click the Connect button.
If you control the server, and you don’t have any long running user processes you want to be able to reconnect to on the server I highly recommend also setting up your servers to automatically disconnect inactive sessions.
That way even if you get disconnected, you just have to wait a few min. until the first connection to drop times out.