Before setting up a tunnel into your Container, please read the Tunneling Overview section to learn what capabilities are enabled through tunneling.
PuTTY is an SSH client which allows you to establish shell sessions to remote servers in order to manage them. You may obtain PuTTY from http://www.chiark.greenend.org.uk/~sgtatham/putty/ . PuTTY comes in two forms binary named which does not require installation or as an installable package. If you choose the independent binaries you will require: putty.exe.
It is best to use putty version 0.62 or newer since a few earlier versions suffer from a bug which might prevent the creation of a debug tunnel.
Stage1 - Setting Up Your Access Key
For security reasons we only allow access to the container using public/private key authentication instead of a password. The remote server you wish to access only needs to know your public key which it uses to encrypt information. Only a person knowing the private key can login to the server and decrypt that information. The private key is never transmitted thus making it difficult to hack.
During container creation you were asked to either upload a public key or to generate a key pair. If you have uploaded a key then we can assume that you are familiar with the topic and can skip to the next stage. Your container already knows your public key so all you need to access it is the private key.
Private Key conversion
If you have downloaded your key in PEM format then you will first have to convert it using pagent before you can use it with WinSCP. Pagent is part of the WinSCP Installation Package so no installation is required. You should follow the steps below.
Locate the downloaded PEM certificate file and double click on it. After doing so you will get the following notice - click OK to continue
Since the private key allows access to the container it is recommended you protect it with a passphrase. The passphrase will be used to encrypt the key and is not stored anywhere, so if you forget it you will have to regenerate the key. Enter the chosen passphrase into "Key passphrase" and "Confirm passphrase"
- Click on "Save private key" to save the key and finish.
Stage 2 - Connecting to a Saved session
When you first start PuTTY you will reach a screen from which you can connect to a saved session. If you have already created a session using this tutorial just click on its name, then on "Load" and then on "Open" and you are done. If you have not created a session then proceed to stage 3.
Stage 3 - Creating a new session
Disable remote command execution
In the "Category" section double-click on "SSH" and check "Don't start a shell or command at all" and "Enable compression".
Click on "Tunnels" and enter the following details for each service you want to enable:
- To Enable Zend Studio based Debugging:
- Source port: 10137
- Destination: 127.0.0.1:10137
- To Enable Remote MySQL management using MySQL Workbench or similar tools:
- Source port: 13306
- Destination: <CONTAINER NAME>-db.my.phpcloud.com:3306
Click on "Add".
Click on "Proxy" then click on "HTTP" and enter your container's fully qualified domain name (FQDN) into "Proxy hostname".
Configure authentication using access keys
Click on "Auth" and enter the location of your container's private key from stage 1. You can click on "Browse..." and locate it if you don't know the exact path.
You can leave the other check boxes as they are. If you use "Pagent" for key management then this stage is optional.
Save the session
In the "Host Name (or IP address)" field enter your container name in the form "<container_name>@<container_name>.my.phpcloud.com" .
Give your new session a name and enter it to the "Saved Sessions" field and click on "Save". In the example below I named the session "proxy-davidl71".
You can now connect to your new "Saved Session" by clicking on "Open".