We use Maven's good, old ssh method to publish Maven artifacts to our web server, which is the traditional way to use maven site:deploy, maven jar:deploy, etc. To accomplish this, we run an sshd server on our public web server so that our Cruise Control server can publish Maven artifacts to our web server. This allows our central Maven repository and project web sites (which are automatically built by Cruise Control using Maven) to be accessible to our collaborators via our public web server.

Our public web server is IIS6 running on Windows Server 2003, while our Cruise Control server runs on a Linux server behind the SLAC firewall. What follows is a redux of a very useful set of instructions provided by Nicholas Fong that I originally used to set up the GLAST's sshd server on Windows Server 2003. The only reason for reproducing Nicholas's instructions here is so that we have a record of how we set up sshd on Windows Server 2003 should Nicholas' site ever is inaccessible, as well as to document procedures that were specific to our setup.

We use the sshd server from the Cygwin project.

Install Cygwin with the OpenSSH Package

  1. Login either as Administrator, or as a user in the Administrators group.
  2. Create the folder c:\cygwin
  3. Using Internet Explorer, run setup.exe from the Cygwin web site, which is the Cygwin installer. Note that Firefox will not work - you must use Internet Explorer.
  4. When the installer asks for Root Directory, enter C:\cygwin
  5. When the installer asks for Local Package Directory, enter C:\glast\software\cygwin
  6. When the installer presents the Select Packages screen, click the + sign next to Net, then click the icon next to the openssh package (the icon looks like a circle with arrows).

Set Environment Variables

  1. Create a System environment variable (not a User environment variable) named CYGWIN with a value of ntsec tty
  2. Append C:\cygwin\bin to the System PATH environment variable (not the User PATH environment variable).

Configure sshd

  1. Run bash by double clicking the Cygwin icon that the installer either put on your desktop, on the Start menu, or both. At the bash prompt, run ssh-host-config
  2. If the script asks about "privilege separation", answer yes
  3. If the script asks about "local user", answer yes
  4. If the script asks about "install sshd as a service", answer yes
  5. If the script asks for "CYGWIN=", answer ntsec tty

Start sshd and Test

  1. To start the sshd service, at the base prompt run net start sshd or cygrunsrv -start sshd
  2. To stop the sshd service, at the base prompt run net stop sshd or cygrunsrv --stop sshd
  3. Test if the sshd service is working by running ssh $USERNAME@127.0.0.1
  4. If you weren't able to login, try running ssh-user-config

Associate Windows usernames to Cygwin usernames

  • No labels