Configure Cygwin for Okta Privileged Access

Windows users can install Cygwin, which provides GNU and open-source tools that provide similar functionality to that of Linux operating systems. To work correctly with Okta Privileged Access, users must configure ProxyCommand to work with Cygwin.

Before you begin

Start the procedure

  1. Start a local terminal in Cygwin. By default, this opens to your home directory (~).
  2. Create an .ssh directory with the following command: mkdir .ssh
  3. Edit the SSH configuration file with the following command: cat <<ADDTEXT >> .ssh/config. ADDTEXT is a delimiter that's used to determine when to stop accepting input for the configuration file.
  4. If you're using sft v1.109.0 or newer, copy the output from sft ssh-config --cygwin.
  5. If you're using sft version that's older than v1.109.0, enter the follow commands in the terminal:
    # Configures ProxyCommand for use with Okta Privileged Access
    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
  6. Save the configuration file.

Adjust the window resize delay

If you're using sft v1.109.0 or newer, the ProxyCommand that sft ssh-config --cygwin generates includes the SFT_SSH_WINDOW_CHANGE_DELAY_MS environment variable. The default value is 250 milliseconds.

When you resize the Cygwin terminal window during an SSH session, the client tools wait for this delay before they pass the resize notification to the remote server. The delay applies only to resize notifications. Typing, command output, and other session traffic are transmitted immediately. The delay prevents display corruption when you resize the terminal while running a full-screen program, such as vi.

The default value works for most connections. On high-latency connections, display issues might still occur. To change the delay, use one of the following methods:

  • Set the variable in your Cygwin shell. In the following example, the delay is 500 milliseconds:
    export SFT_SSH_WINDOW_CHANGE_DELAY_MS=500
  • Set the variable for a single connection:
    SFT_SSH_WINDOW_CHANGE_DELAY_MS=500 ssh <target>
  • Edit the generated configuration directly. In the ProxyCommand line in ~/.ssh/config, replace 250 in ${SFT_SSH_WINDOW_CHANGE_DELAY_MS:-250} with your preferred value.