Build and installation instructions for the NoMachine OpenSSH Win32 Port version openssh-4.7p1-win32 and openssh-5.4p1-win32
Although it should be possible to build with Visual C++ 2005 and SDK Platform for Windows XP or later, the following instructions refer to compiling the NoMachine OpenSSH portable version with MingW under a Cygwin environment.
Build and Installation Instructions
- Download the newest OpenSSL library.
- Compile and install OpenSSL by running the following commands in the OpenSSL root directory:
$ ./Configure mingw
$ make
$ make install - Download the newest zlib library.
- Compile zlib by running the following commands in the zlib root directory:
$ make -f win32/Makefile.gcc - Download OpenSSH portable for native Win32 from the NoMachine web site.
- Compile OpenSSH portable for native Win32 by running the following commands in the ssh root directory:
$ export CPPFLAGS="-mno-cygwin -I$PWD/openbsd-compat -I \
$PWD/contrib/win32/win32compat/includes"
$ export LDFLAGS="-mno-cygwin"
$ autoreconf
$ ./configure --build=i686-pc-mingw32 --host=i686-pc-mingw32 \
--with-ssl-dir=/usr/local/ssl --with-zlib=../zlib-1.2.4
$ cat config.h.tail >> config.h
$ make ssh.exe sshd.exe - Then copy the ssh.exe and sshd.exe executable files to the installation directory.
Note that the ssh client should be ready to work, while further
operations are needed to get the ssh server up and running:
- Copy the sshd_config file from source directory to installation directory and change 'UsePrivilegeSeparation' from 'yes' to 'no'.
- Generate the SSH keys. Since port of ssh-keygen tool is not available, it is necessary to generate the key-pair on another host or to use the cygwin ssh-keygen tool. Copy the generated keys, namely ssh_host_rsa_key and ssh_host_dsa_key to the installation directory.
- Execute the sshd server:
$ sshd -r - Note that the user who executes the sshd daemon requires some additional privileges to be set:
SeCreateTokenPrivilege
SeAssignPrimaryTokenPrivilege
SeServiceLogonRight
SeIncreaseQuotaPrivilege
SeTcbPrivilege
SeImpersonatePrivilege
