Table of contents
Introduction
SSH stands for Secure Shell Handler and is a protocol used to connect securely to a remote server and execute commands. It is the equivalent of opening a terminal window on the remote server. To connect to a BitNami hosted server, you will need a special file named "Private Key", that is associated with your Amazon EC2.
SSH Private Key
Each Amazon cloud account has an associated SSH key file ("Private key") that you can use to connect remotely to the servers launched using that cloud account credentials. This file needs to be protected, as anybody who has access to it can access your servers. On Linux and OS X, it is necessary to change its permissions, so it is only readable by you.
$ chmod 600 bitnami-hosting.pem
Otherwise you may get a 'bad permissions: ignore key' error.
How can I download my private SSH key
Go to the Servers section, select your server, click 'Manage Server' and use 'Connect' button. In case you don't have any servers, you can download his file going to Clouds > Manage, clicking on the appropriate cloud account. Click on the appropriate format to start the download:
- Select PEM format if you are going to connect from Linux, OS X or other Unix systems
- Select PPK for Windows Putty, FileZilla and WinSCP.

How can I get my private SSH key in PPK format?
PPK is the private key format used by Windows programs Putty, FileZilla and WinSCP.
If you are a BitNami Cloud Hosting client, you can download your key in this format directly: click "Connect" in "Server Manage" view and use "PPK" button.
Otherwise, you will need to convert your downloaded key to PPK format as described here: http://the.earth.li/~sgtatham/putty/0.60/htmldoc/Chapter8.html#puttygen-conversions


How to connect to my server
Windows does not come with a bundled SSH client by default. It is recommended that you use the freely available Putty utility, which can be downloaded from:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
You will need to get your SSH key in PPK format
Once you have your key in PPK format, you can connect following these steps:
- Start Putty ( Start Menu -> Programs -> Putty -> Putty ).
- Enter your machine IP address or public domain name in the Session section. You can find out the hostname of a server by going to the Servers page, selecting the server and clicking 'Manage Server'. The hostname will appear next to Public DNS and it will be similar to 'xyz.bitnamiapp.com. Of course a server needs to be running so you can connect to it.

- Add your private SSH PPK key path. More Info

- Click "Open" to start the SSH session.
- Click "yes" to accept SSH key.
- Enter your login: bitnami

You can also simplify the above procedure and add your key to the special SSH agent. This way you will not have to provide your ssh key every time you connect.
- Start "Pageant" ( Start Menu -> Programs -> Putty -> Pageant ).
- Click "Add key" and choose the PPK file.
- Open "Putty" application ( Start Menu -> Programs -> Putty -> Putty ).
- Go to Connection -> Data using the left menu.
- Enter "bitnami" as the "Auto-login username".
- Go to "Session".
- Insert your server Public DNS (ec2-xyz.compute-1.amazonaws.com / xyz.bitnamiapp.com) in the "Host Name" field. You can find this in Server Management for BitNami Cloud Hosting servers or in the instance properties in Amazon console.
- Click "Open" to start the SSH session.
If you prefer to use putty from the command line you should include '-i' and '-l' options as follows:
> putty -i "C:\Path\To\bitnami-hosting.ppk" -l bitnami example.com
MobaXTerm is an enhanced terminal with an X server and a set of Unix commands (GNU/Cygwin) packaged in a single portable exe file. You can dowload it at:
You will need to get your SSH key in PEM format. In this case it is not necessary to import your private key into the application, you can use it directly.

You can copy files to the machine using the right panel or you can connect to the machine through SSH:
$ ssh -i private_key bitnami@your-machine-hostname
You will need to get your SSH key in PEM format.
Linux and Mac OS X come bundled with SSH clients by default. To connect to your server using SSH, you need to open a Terminal and type the following:
$ ssh -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
You will need to replace bitnami-hosting.pem with the path to your private key file and replace example.com with the IP address or hostname of your server. You can find out the hostname of a server by going to the Servers page, selecting the server and clicking 'Manage Server'. The hostname will appear next to Public DNS and it will be similar to 'xyz.bitnamiapp.com. Of course a server needs to be running so you can connect to it.
Make sure your SSH key bitnami-hosting.pem has proper permissions. You can set the permissions using the command below:
$ chmod 600 bitnami-hosting.pem
How can I access my server as the root user?
By default, you can only log in as the 'bitnami' user to a BitNami EC2 instance. Once logged in, you can use the 'sudo' utility to become the super user or execute.
$ sudo su
SSH tunnel
If you want to connect to the local port which is not available from outside, you can use SSH encrypted tunnel. Assuming that your server application is running at the port 9990 and that you want to have access to it from your local port 9991.
If you are using Windows in your local machine you can create the tunnel as follows:
- Follow the steps to connect using Putty
- Before opening the connection. Go to Connection -> SSH -> Tunnels, enter the values below and click "Add" button:
- Source port: "9991"
- Destination: "localhost:9990"
If you are in Linux or Mac you can run the following in a console in your local machine (using your Public DNS instead of xyz.bitnamiapp.com):
$ ssh -v -N -L 9991:127.0.0.1:9990 -i bitnami-hosting.pem bitnami@xyz.bitnamiapp.com
While the tunnel is active you can connect to your server port 9990 at 127.0.0.1:9991
Troubleshooting
The SSH warning: REMOTE HOST IDENTIFICATION HAS CHANGED
It is normal when you are trying to connect to the same IP but the machine is different, for instance when you assign the static IP address to another server. You can fix the problem by removing the IP address (you are trying to connect) line from your ~/.ssh/known_hosts file.
If you use Putty, then ssh key mismatch warning looks like below:
WARNING - POTENTIAL SECURITY BREACH! [...]
In this case click Yes, if you know the reason for the key mismatch (IP address assigned to another server, machine replaced, etc.)

Comments