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
- From the command line, run the installer for Cygwin
- Click next at all prompts until your reach the Select Packages menu
- Set the View tab to "Full." Then, type "openssh" in the search box
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.
- Click "next" until the binary installation is completed. After, click "finish"
Set up SSH
Complete the following steps to test and finalize SSH:
- Open the Cygwin terminal.
which sshto verify that SSH is installed on your device.
- If you do not have a .ssh directory, run the command
mkdir .sshin the Cygwin terminal to create a directory for SSH configurations
- Type cat > .ssh/config and press Enter
- Copy and paste the following lines in the blank new line:
- After pasting, press Enter
- Press Ctrl + C to exit the terminal.
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