4

My job is 95% Unix administration, but sometimes I manage Windows machines remotely. While I'm familiar enough with VNC and RDP solutions, there are times when I'd like something a little more lightweight for bandwidth reasons, as well as having a more familiar scripting environment and tool set.

I know there are several Unix layers for the Windows platform e.g. cygwin, uwin, WSU, and there are a handful of sshd servers. However, I'm not sure which ones give the most "unix-like" console experience, in terms of shells and standard utilities e.g. ps, top, tcpdump. Do these environments allow one to run the normal, stock command line utilities such as net, ipconfig, fsutil as well?

Any experiences, advice and hints welcome.

0

1 Answer 1

7

For the most Unix-like console experience, I'd definitely use OpenSSH with Cygwin. This way, all of your Windows commands are available, as well as your Unix commands.

Installing OpenSSH with Cygwin is a breeze. Simply check off the OpenSSH box under the Net section when choosing packages:

alt text

After setup, run ssh-host-config in Cygwin. It will ask you various questions:

  • privilege separation - answer yes
  • create a local sshd user - answer yes
  • install sshd as a service - answer yes
  • Your cygwin tty (CYGWIN=) - answer ntsec tty

Now open c:\cygwin\etc\defaults\etc\sshd_config.

Change #Protocol 2,1 to Protocol 2 for security reasons.

Now you can start the sshd service. Go to Control Panel -> Administrative Tools -> Services and start Cygwin sshd:

alt text

you'll want to set the service to start automatically so it persists across reboots.

If you're using the Windows firewall, add an exception on port 22:

alt text

For a console, I'd highly recommend PuTTY to connect remotely.

2
  • 2
    Voted for a great, succinct primer. I'm still fine-tuning the install. I'll see if I can get what I need. Jan 18, 2010 at 3:41
  • 1
    @Geoff, @John: i've just run through this on my system with the latest cygwin 1.7.x. i don't believe the step editing /etc/defaults/etc/sshd_config is necessary; in particular this file is a default file, while /etc/sshd_config should be the one used by the daemon. the recommended change no longer seems necessary; the default value of that line is now #Protocol 2 and you'd have to explicitly change that to allow protocol 1. (otherwise, good tips, thanks!) Apr 19, 2010 at 11:44

Not the answer you're looking for? Browse other questions tagged .