Configuring WinSCP As a Custom Launcher

This topic is configuration only—see Creating Custom Launchers for instructions.

Custom Process Launcher

General Settings

  • Wrap custom parameters with quotation marks: No

  • Record Multiple Windows: Yes

  • Record Additional Processes: < None >

  • Use SSH Tunneling with SSH Proxy: No

Windows Settings

  • Process Name: winscp.exe

  • Process Argument: scp://$username:$password@$machine:$port

  • Process Argument: sftp://$username:$password@$machine:$port

  • Run Process As Secret Credentials: No

  • Load User Profile: No

  • Use Operating System Shell: No

Process Arguments:
  • WinSCP provides different protocols. The settings above show SCP or SFTP.
  • $machine is used because it is a direct connection.

Custom Process Tunneled Launcher

General Settings

  • Wrap custom parameters with quotation marks: No

  • Record Multiple Windows: Yes

  • Record Additional Processes: < None >

  • Use SSH Tunneling with SSH Proxy: Yes

Windows Settings

  • Process Name: winscp.exe

  • Process Argument: scp://$username:$password@$host:$port

  • Process Argument: sftp://$username:$password@$host:$port

  • Run Process As Secret Credentials: No

  • Load User Profile: No

  • Use Operating System Shell: No

Process Arguments:
  • WinSCP provides different protocols. The settings above show SCP or SFTP.
  • $host is used because it is a tunneled connection.

Custom Process Proxied Launcher

General Settings

  • Wrap custom parameters with quotation marks: No

  • Record Multiple Windows: Yes

  • Record Additional Processes: < None >

  • Use SSH Tunneling with SSH Proxy: Yes

Windows Settings

  • Process Name: winscp.exe

  • Process Argument: scp://$username:$password@$host:$port /rawsettings Shell=/bin/bash

  • Process Argument: sftp://$username:$password@$host:$port /rawsettings SftpServer=/usr/libexec/openssh/sftp-server

  • Run Process As Secret Credentials: No

  • Use Operating System Shell: No

Process Arguments:
  • WinSCP provides different protocols. The settings above show SCP or SFTP.
  • $host is used because it is a proxied connection.

SCP

/rawsettings Shell=/bin/bash must be specified to state the Unix shell used.

The value will be different depending on each account, /bin/bash is common but the exact value is obtained from executing the following command

[jeff@box ~]$ echo $SHELL

/bin/bash

SFTP

/rawsettings SftpServer=/usr/libexec/openssh/sftp-server must be specified to instruct how to launch the FTP server. The value could be different depending on what is installed on the Unix server—best to run one of the following commands to determine the answer:

[root@box jeff]# ps -ef --forest

[root@box jeff]# ps -ef | grep ftp

Using SSH Keys for Authentication

Users can authenticate via SSH using public keys generated within Secret Server, eliminating the need for passwords. This method enhances security by leveraging SSH key pair authentication through the SSH Terminal server when the SSH Proxy is enabled.

Configuration Steps

  1. Enable SSH Proxy and SSH Terminal:

    • Search for SSH Proxy, click Edit next to Enable SSH proxy, and click OK in the popup.

    • Search for SSH Terminal, click Edit next to Enable SSH terminal, and click OK in the popup.

  2. Activate SSH Key Integration:

    • Search for SSH key integration, click Edit, and check to enable SSH key integration (for SSH terminal) (if not enabled).

    • Set the Unix Authentication Method to Public Key only. When done, click Save.

  3. Generate SSH Key Pairs:

    • Click on your username at the top right corner of the Secret Server interface to open the dropdown menu, and select User Preferences.

    • Under the General tab, click on the Public SSH keys.

    • Click Create SSH Key and complete the required details to generate a key pair:

      • SSH Key Name: enter the related key name.

      • Format: select the key format - OpenSSH, PuTTY, or PuTTY3.

      • Algorithm: Select algorithm - RSA 4096, or ECDSA P-256.

      • Passphrase: Enter the passphrase.

      • Key Expiration: Set by admin.

      • Check the box for I acknowledge that this will download the only copy of the private SSH key.

      • When done, click Create SSH Key.

    • Click on the key that now appears in the Public SSH keys list, its detail will expand to the right. Save the private key and store it securely, as it can only be downloaded once. The public key is stored in the user's settings.

Authentication Process

  • During terminal login, Secret Server validates the provided private key against the user's saved public keys. If a match is found, authentication succeeds.

  • In SSH clients like PuTTY, users can add the private key file saved from Secret Server to authenticate without a password.

  • When accessing the SSH Terminal, the user is prompted for their Secret Server Username that matches the key and enters the key passphrase; the user password is not required.