Introduction

FirstSpirit Server under Windows

The installation packages of Cygwin are recommended as ssh client and rsync under Windows. Cygwin offers a convenient package administration which enables future updates of the individual packages via the Internet without further configuration. The installation and configuration of OpenSSH and rsync on a Windows-based web server is described below:

  1. Login as user with administrator rights.
  2. Download setup.exe at http://cygwin.com and start it.
  3. Enter, e.g., c:\cygwin as the installation target directory and leave the default options “Install for all Users” and “Text File Type Unix” unchanged. Choose, e.g., c:\cygwin\cache as the “Local Package Directory”.
  4. Upon a request for packages to be installed, retain the default setting and additionally select the packages “openssh” and “rsync” in the “Net” category for installation. Change the arrow icons, on the left next to the package name, from "Skip” to the version number (by clicking). Other required packages are thus automatically selected.
  5. Installation is completed after clicking to the next window.
  6. Finally, call the Cygwin shell via the Cygwin icon on the desktop or via the start menu. If, depending on the Windows system, you are prompted to update /etc/group and /etc/passwd, confirm update and follow the instructions. Subsequently exit the shell by entering “exit”, call it again and leave it open. A prompt regarding /etc/passwd should not appear.

The rsync/ssh web server connection is subsequently configured:

  1. Login as user with administrator rights on the Windows system of the FirstSpirit Server.
  2. Call the Cygwin shell via the start menu.
  3. Generate a ssh key pair:
    ssh-keygen -t rsa
    Accept the default specifications and do not enter a password.
  4. Use the Windows Explorer to change the access permissions to the file
    c:\cygwin\home\username\.ssh\id_rsa
    to ensure that the SYSTEM user account is also granted reading permissions. This is necessary, since the FirstSpirit Server is running under the SYSTEM user account.
    “username” is in this case the current user name with which “ssh-keygen” has been called during the last step.
  5. Install the public key on the "web” user account of the web server. Login as "web” via ssh and create the directory .ssh in the home directory:
    mkdir .ssh
    Enter the following in the Cygwin shell on the FirstSpirit Server:
    scp .ssh/id_rsa.pub web@www.mydomain.net:.ssh/authorized_keys
  6. To test the login via the key pair (without password), call the prompt on the Windows system of the FirstSpirit Server (cmd.exe) and enter:
    c:\cygwin\bin\ssh web@www.mydomain.net ls -la /var/www
  7. The document directory of the web server should now be listed without having to enter a password.
  8. To test the rsync connection, enter:
    c:\cygwin\bin\rsync -n -vcrtz -e "c:\cygwin\bin\ssh -l web"
    www.mydomain.net:/var/www
  9. The document directory of the web server should be listed again without having to enter a password. Files have not been transferred due to the option “-n”.
  10. If a Windows system is used as a web server, replace /var/www by /cygdrive/c/www.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.4 | Data privacy