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
- Login either as
Administrator
, or as a user in theAdministrators
group. - Create the folder
c:\cygwin
- 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.
- When the installer asks for Root Directory, enter
C:\cygwin
- When the installer asks for Local Package Directory, enter
C:\glast\software\cygwin
- 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
- Create a System environment variable (not a User environment variable) named
CYGWIN
with a value ofntsec tty
- Append
C:\cygwin\bin
to the SystemPATH
environment variable (not the UserPATH
environment variable).
Configure sshd
- 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
- If the script asks about "privilege separation", answer
yes
- If the script asks about "local user", answer
yes
- If the script asks about "install sshd as a service", answer
yes
- If the script asks for "CYGWIN=", answer
ntsec tty
Start sshd and Test
- To start the sshd service, at the base prompt run
net start sshd
orcygrunsrv -start sshd
- To stop the sshd service, at the base prompt run
net stop sshd
orcygrunsrv --stop sshd
- Test if the sshd service is working by running
ssh $USERNAME@127.0.0.1
- If you weren't able to login, try running
ssh-user-config