Setting up SSH for Remote Development

Index of All Documentation » Wing Pro Reference Manual » Remote Development »


To work with a remote host, you first need to set up secure SSH remote access outside of Wing Pro. You should configure this so that you can connect to the host without having to enter a password each time you connect. Instead, you want authentication to occur using an SSH key pair, and by entering your password once to load the key into an SSH user agent.

On Linux and OS X this is done with the standard OpenSSH tool suite that comes with the OS. On Windows this can be done with PuTTY or by using OpenSSH provided by Cygwin or Git Bash. If you do not already have this set up, or you cannot log into the remote host without entering a password every time you connect, please refer to SSH Setup Details before going any further.

Accessing SSH From Wing

Once you have SSH working outside of Wing, and can connect to the remote host without entering a password for each connection, start Wing in an environment where it will be able to access your SSH keys via the SSH user agent. How this is done varies according to OS and which SSH implementation you are using:

Windows with PuTTY -- Start pageant.exe from the command line. Then right-click on the icon that appears in lower right of your screen and select Add Key to add your key. You may need to redo this each time you log in. The private key file can also be passed to pageant.exe on the command line.

Windows with Cygwin or Git Bash -- Start Cygwin and type ssh-agent bash on the command line. Type ssh-add to add your key. Then type set | grep SSH_, copy the SSH_AGENT_PID and SSH_AUTH_SOCK lines, and paste them into the Environment in Wing's Project Properties. You will need to redo this each time you quit Cygwin since the contents of the environment variables will change. One way to avoid having to set these environments is to create your SSH key without an encryption password. For details see Connecting without SSH User Agent below.

OS X -- Add your key to Keychain Access and optionally set usage restrictions for the key with Get Info from the File menu.

Linux -- Add your key with ssh-add on the command line. You need to rerun ssh-add each time you log in. If for some reason your Linux does not run ssh-agent on its own, see the instructions for Windows with Cygwin above.

Pointing Wing at OpenSSH or PuTTY

Wing uses the following command line tools to implement secure access to remote hosts: ssh and scp (with OpenSSH) or plink.exe and pscp.exe (with PuTTY).

Wing tries to find these tools on the PATH on the machine where Wing IDE is running, and on Windows it also searches for PuTTY and Cygin-provided ssh (in that order) in common installation locations if it cannot find it on the PATH.

If Wing cannot find ssh or plink.exe you will need to add its directory to your PATH or set the Network > SSH Executable preference in Wing to the full path of the command. If this is set, Wing also tries to find scp (or pscp.exe on Windows with PuTTY) in the same directory as the specified executable.

Connecting without an SSH User Agent

Although we recommend against it from the standpoint of maintaining proper security, it is possible to use SSH without an SSH user agent. This is done by creating an SSH key without an encryption password.

With OpenSSH, the key can either be saved as the default ~/.ssh/id_rsa or, preferably from a security standpoint, you can create a key used just for a specific host by pointing ssh at it in the ~/.ssh/config file as in the following example:

Host somehost
    User someuser
    IdentityFile ~/.ssh/someuser@somehost/id_rsa_no_pw

With PuTTY on Windows, configuration is instead done with putty.exe where you create a saved session and set the private key file for authentication in the Connection > SSH > Auth configuration area. Then save the session and plink.exe will use that unencrypted private key without prompting for a password.