cygwin comes with an ssh daemon. There's good instructions on this
page:
http://pigtail.net/LRP/printsrv/cygwin-sshd.html
Yes, you can install cygwin and enable the SSHD, and then if you use
something like PuTTY to connect, you get an interface that is similar to
using CMD.
There is also a package available for download at:
http://www.openssh.com/windows.html
(project page at
http://sshwindows.sourceforge.net)
This installs just enough of cygwin to get the SSHD running, and is
easier to set up than setting up cygwin and then figuring out how to
configure the SSHD. I don't think you get quite the same sort of
commandline interface if you use this instead of the full cygwin package,
so you may want to try both to see which you like best (you can't install
both at once, as they share reg settings, etc.).
Of course, there is also the built-in terminal services connection in
Server 200x, that you can access using the Remote Destop Client from XP
(there is also a client for earlier versions of Windows). This gives you
a full desktop though, so may be a bit of overkill for what you want.
There are a number of third-party programs that give you ways of
executing single commands on a remote machine - you can sometimes use
these to execute CMD, giving you a remote commandline window.
Some of these are:
rexec (part of WindowsXP - can't remember if it comes with earlier Win)
psexec (
www.sysinternals.com)
rmtcmd (
www.skrubbeltrang.com)