# Local testing with SSH tunnels on Windows

## Local testing on Windows

To use the SSH tunnels on Windows, you'll need to download several programs from the Putty software suite. The Putty software suite lets you easily use the SSH protocol on Windows.

If you're setting up the SSH tunnels on Windows for the first time, it will take you less than 10 minutes to get going. After you've setup your environment, it will take just a few seconds to open a tunnel. Here's what you need to do:

• Step 1 - generate a private/public key pair.
• Step 3 - open and use the tunnel.

### Generating a private/public key pair

If you don't have a private/public key pair yet, you'll first need to generate the private/public key pair with the puttygen.exe program. You can download the puttygen.exe from the Putty Downloads page.

Once you've downloaded it, load it up, choose the SSH-2 RSA key type and click Generate to generate the key pair:

Choose SSH-2 RSA key type and click Generate to generate the key pair.

Next, save both the public and the private pairs somewhere on your computer:

Click Save public key and Save private key to save the key pair.

Don't forget where you saved the files as you'll need them. I usually save them to c:\putty-keys. But if you forgot where you saved them it's no big deal. You can just generate the files again!

Next you'll need to upload the public key to your account. You can do that through the SSH key management page in your account.

Copy the public key from the key generator (or the public key file):

Just copy the public key from the program, or from the public key file that you saved.

Go to the SSH key management page and paste it in the text box:

Paste the public key in the text box and click Add.

You can add as many ssh keys as you like. If you use multiple computers, you can add the public key of every computer. Once you've done that, you can use the tunnels to cross-browser test sites locally!

### Using the SSH tunnel for local testing on Windows

You'll need to download another program from Putty software suite. This program is called plink.exe and is used to open SSH tunnels. Go to Putty Downloads and download plink.exe.

To open a tunnel, start using Browserling and click the SSH Tunnel menu and choose Windows as your platform. Enter the hostname:port of your local web server. For example, localhost:80, or localhost:8080. You can also tunnel local area network servers, not just your localhost. For example, you can tunnel 10.1.1.25:80, or 192.168.5.2:40000:

Enter the host:port of your local web server and click Open tunnel.

Click Open tunnel and wait a few seconds. Browserling will open a tunnel for you. Copy the plink.exe command:

Copy the plink.exe ... command and paste it to Windows Command Prompt.

Next open the Command Prompt, paste the full command and add the path to your private key:

Copy the command and add the path to the private key -i c:\putty-keys\private.ppk.

Don't forget to add the -i c:\path\to\your\private-key.ppk to the command. I saved my key in c:\putty-keys\private.ppk, so I added the -i c:\putty-keys\private.ppk argument.

If everything was successful, the command will just sit there and do nothing. At this point the tunnel is established. Now when you navigate to the tunnel URL in Browserling, your connection will go through to hostname:port that you entered.

To close the tunnel simply click Close tunnel in the tunnel menu and hit Ctrl+C in the Command Prompt to exit plink.exe.

### Local testing on Linux and Mac

Not on Windows? Check out the Local testing on Linux and OSX guide!