Configure SSH and ProxyCommand with Cygwin

Although MacOS and Windows both have native command line applications with SSH binary, Windows users have a lot of freedom when it comes to what applications they want to use to configure SSH. Cygwin allows for the installation of GNU and Open Source tools to provide a functionality like that of Linux operating systems. This guide will show you how to configure Advanced Server Access to work with OpenSSH in Cygwin using ProxyCommand


Before beginning, be sure to have completed these steps:

  • Download the appropriate installer from Cygwin to download and install packages.
  • Verify that the Advanced Server Access Client is installed on your workstation.

Set up SSH with Cygwin

Install Cygwin and OpenSSH

  1. From the command line, run the installer for Cygwin
  2. Click next at all prompts until your reach the Select Packages menu
  3. Set the View tab to "Full." Then, type "openssh" in the search box
  4. In the list that populates, locate the row for the openssh package. In the New column, change its dropdown from "Skip" to the latest package version for OpenSSH.

  5. Click "next" until the binary installation is completed. After, click "finish"

Set up SSH

Complete the following steps to test and finalize SSH:

  1. Open the Cygwin terminal.
  2. Enter which ssh to verify that SSH is installed on your device.
  3. If you do not have a .ssh directory, run the command mkdir .ssh in the Cygwin terminal to create a directory for SSH configurations
  4. Type cat > .ssh/config and press Enter
  5. Copy and paste the following lines in the blank new line:
  6. Note: The following lines use /Admin/ as an example folder path. Modify this path as needed for your system before copying and pasting to the Cygwin terminal.

    # To use ScaleFT proxycommand, add this configuration block to your $HOME/.ssh/config
    Match exec "/cygdrive/c/Users/Admin/AppData/Local/Apps/ScaleFT/bin/sft.exe resolve -q %h"
    ProxyCommand "/cygdrive/c/Users/Admin/AppData/Local/Apps/ScaleFT/bin/sft.exe" proxycommand %h
    UserKnownHostsFile /cygdrive/c/Users/Admin/AppData/Local/ScaleFT/proxycommand_known_hosts
  7. After pasting, press Enter
  8. Press Ctrl + C to exit the terminal.