Home » Support » Index of All Documentation » Wing IDE Reference Manual » Project Manager » Remote Hosts »

SSH Setup Details

This guide will help you set up secure password-less SSH access to remote hosts that you want to use with Wing IDE. If you already know how to set up password-less SSH access to a remote system using your SSH key, the process is the same for Wing and you can skip this section.

Linux and and OS X SSH Setup

The necessary tools for SSH access are already installed on your Linux and OS X system, and many developers already have an SSH key generated and in use.

If you do not already have an SSH key, you will need to generate one with ssh-keygen as follows on the Linux or OS X system where you will be running Wing IDE:

mkdir ~/.ssh
chmod 700 ~/.ssh
ssh-keygen -t rsa

Use the default settings and enter a password for encrypting the private key. Assuming default settings, this will produce ~/.ssh/id_rsa (private key file) and ~/.ssh/id_rsa.pub (public key file). The private key should left where it is, protected from any outside access, and replaced if ever compromised.

A copy of the public key needs to be transferred to the remote host you want to connect to and added to ~/.ssh/authorized_keys. The following is one way to accomplish this:

ssh username@remotehost "mkdir .ssh; chmod 700 .ssh"
scp ~/.ssh/id_rsa.pub username@remotehost:.ssh/pub.tmp
ssh username@remotehost "cat .ssh/pub.tmp >> .ssh/authorized_keys; rm .ssh/pub.tmp"

Finally, run ssh-add on the host where the IDE is running, to add your newly created SSH key to the key chain manager.

Now you should be able to connect to the remote host without having to enter a password as follows:

ssh username@remotehost

If your remote server is running SSH on a non-default port (this is rare), then you will also need to edit your SSH configuration on the host where the IDE is running to set that port. This is done in ~/.ssh/config with an entry that looks like this:

host myhost.mydomain.com
   port 8022

Windows SSH Setup

If you don't already have it, download and install the complete suite of tools provided by PuTTY. You will need putty.exe, plink.exe, and pscp.exe and also puttygen.exe if you don't already have an SSH key set up.

If you don't already have an SSH key set up, you will need to generate one by running puttygen.exe, pressing the Generate button, providing the requested random input by moving your mouse over the blank area, entering and confirming a passphrase, and then saving both the public and private key files. The private key file is typically named id_rsa.ppk and the public key file is id_rsa.pub.

The private key file should be left where it is, protected from outside access, and replaced if compromised.

A copy of the public key needs to be transferred to the remote host you want to connect to and added to ~/.ssh/authorized_keys. The following is one way to accomplish this:

plink username@remotehost "mkdir .ssh; chmod 700 .ssh"
pscp id_rsa.pub username@remotehost:.ssh/pub.tmp
plink username@remotehost "cat .ssh/pub.tmp >> .ssh/authorized_keys; rm .ssh/pub.tmp"

Finally, run pageant.exe, right click on the small icon that appears in the lower right of your screen, select Add Key, and select your id_rsa.ppk private key file.

Note that you will need to restart pageant and load your key into it each time you restart Windows or log out and back in. You can provide the id_rsa.ppk key file on the command line to automatically load that key at startup. This can also be used to create shortcuts for your desktop or start menu.

Now you should be able to connect to the remote host without having to enter a password as follows:

plink username@remotehost

If your remote server is running SSH on a non-default port (this is rare), then you will also need to edit your SSH configuration on the host where the IDE is running to set that port. This is done by running putty, entering a host name or ip address and the port number to use, and saving that host name as a saved session (all on the initial Session tab). Once this is done, any connection to that host name will use the configured port.

SSH Setup Details