Configure SSH to use ProxyCommand in Cygwin

Windows users can install Cygwin, which provides GNU and open source tools that provide similar functionality to that of Linux operating systems. You can configure Advanced Server Access to work with OpenSSH in Cygwin using ProxyCommand.

Before you begin

  • Download the appropriate installer from Cygwin to download and install packages.
  • Install Cygwin and a version of the openssh package for Cygwin.
  • Verify that the Advanced Server Access Client is installed on your workstation. See Install the Advanced Server Access client.

Start the procedure

To set up and configure SSH:

  1. Open a Cygwin terminal. By default, this opens to your home directory (~).
  2. Output a list of the files and directories in your home directory by running the command ls -la. If the .ssh directory doesn't exist, create it by entering the command mkdir .ssh
  3. Create a new or edit an existing SSH configuration file by entering cat <<ADDTEXT >> .ssh/config and pressing Enter.
    Note: ADDTEXT is a delimiter that's used to determine when to stop accepting input for the configuration file.
  4. Paste the following lines into the terminal:
  5. # To use 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

    ADDTEXT

     Note: The preceding lines use /cygdrive/c/Users/Admin/AppData/Local/Apps/ScaleFT as an example folder path. Modify this path in your config file to match the location of the Advanced Server Access client on your system.
  6. Press Enter to complete the configuration.