Table of contents
Server properties
When connecting remotely to your machine, you need to know two basic properties: server domain name and credentials. You can find them both in your server Manage section.
In the example below you can find the server public IP address, public DNS name, Application Login and Application Password.

If you click Connect, then you will get an info about SSH login and private key.

Services
- login: bitnami
- You need to use private ssh key (more info)
- port: 22
- login: root
- password: <user defined> (default: auto-generated more info)
- login: postgres
- password: <user defined> (default: auto-generated more info)
Ports
BitNami Cloud Hosting by default opens the following ports for each server: 22, 80 and 443.
How to open an additional server port
BitNami Cloud Hosting by default opens the following ports for each server: 22, 80 and 443. You are able to add more ports if you need.
If you want to open a port, you should:
- Go to the Servers section, select your machine and click "Manage" button. Then click 'Firewall' tab.
- If your server was created recently, then you will see two buttons:
Add Custom Firewall Rules - will allow you to add / remove firewall rules which are applied only to this particular instance. This option may not be available for old BitNami Cloud Hosting machines.
Edit Default Firewall Rules - will let you modify the main AWS Security Group. Please note that any changes here will affect all your servers launched with this BitNami Cloud Hosting cloud account and running in the same AWS region as the current instance. - You can enter the port number (1-65535) or the range of ports (<from port>-<to port>) and the protocol (tcp / udp).
- Optionally, you can restrict the access for a specific IP, modifying the Source IP from everyone (0.0.0.0/0) to (<ip value>/32).
Uploading files
We describe the most popular SFTP clients below. Other FTP clients may be used if they have support for SFTP (Secure FTP). In this case you should set "22" as the port number in the configuration.
You can download the FileZilla Client application from: http://filezilla-project.org/
You should follow these steps to upload files:
- Get your SSH Key in PPK format: Learn more
- Start FileZilla
- Go to edit -> preferences
- Select SFTP
- Click "Add keyfile"
- Select the PPK file
- Save the settings (click OK in settings window)
- In the connection toolbar, enter:
- Host: the Public DNS ( xyz.bitnamiapp.com / ec2-xwz.compute-1.amazonaws.com)
- User: 'bitnami'
- Password: leave it blank
- Port: 22
- Click "Quickconnect"
- If you get a message "The server's host key is unknown", click "ok" button

First, get your SSH key in PPK format: Learn more
Once you have it, use the settings like it is shown in the image below.

This guide describes how to connect using Cyberduck FTP client for OS X but you can use a different one. First, it is necessary to download your private key in PEM format. You can download it from the "Manage" option in BitNami Cloud Hosting.

If you have started a server, you can try to connect using SFTP. Open a new connection and specify this protocol.

Then, open the "More options" tag and enable the "Use Public Key Authentication" option. In this case you should specify the path to your private key that you downloaded previously (bitnami-hosting.pem by default).

Then copy your server domain name, specify the Username: "bitnami" and it is not necessary to specify any password.
The files for each application can be found in /opt/bitnami/apps:
http://wiki.bitnami.org/BitNami_Cloud_Hosting/FAQ#Where_are_my_apps_installed.3f
Editing files
Editing files as root user (administrator).
WinSCP
If you are using winSCP to connect to your instance you can do the following for edit files as root user. Once you have configured the connection as it is described here. You can click on "Advanced options" -> "Environment" -> "SCP/Shell" -> "sudo su -". Please make sure that you select the SCP protocol in the Session section.

Nano
Another option is to use "nano" editor in the server console:
- Connect to your server via SSH. More info
- Execute nano as follows:
$ sudo nano /path/to/the/file
- Perform any changes in the file
- Press "CTRL+X" to exit the editor (it will ask if you want to save the changes, enter 'Y' to apply them)
Files writable by the web server
The Apache web server is running with the "daemon" user permissions so if you want to make directory and all the files inside writable by bitnami user and the web server, then you should connect to your machine via SSH and execute the following commands:
$ sudo chown -R bitnami:daemon /opt/bitnami/apps/wordpress/your_plugin_directory $ sudo chmod -R g+w /opt/bitnami/apps/wordpress/your_plugin_directory
Note: if you are using Amazon Linux or Red Hat, the group should be set to "apache" instead of "daemon"
SSH access
Learn more at this page: SSH
Give SSH access to the another person or your customer
It is better if you ask your customer to send you his own public ssh key generated on Linux/Unix/OS X, this way you can give him an access to your machine without sharing your private keys.
Copy this file my_customer_public_ssh_key to your server.
Now you have two options:
- you can create a separate account for him (RECOMMENDED)
- or just allow him to log into the server using the 'bitnami' account
Create a separate account
First you need to connect to your machine as "bitnami" user via SSH. More info how to do so at this wiki page.
Once you are logged in, to create a new user that will share the same user privileges as "bitnami", you could use the command below:
sudo useradd -s /bin/bash -o -u `id -u` -G `id -g` new_username
That will create an alias user for "bitnami". That means it will be able to write into directories such as htdocs or use sudo.
Now you can configure ssh access for that user. To do that, you can simply copy the bitnami .ssh folder to the new user home directory:
sudo mkdir ~new_username/ sudo cp -rp ~bitnami/.ssh ~new_username/ sudo cp -rp ~bitnami/.bashrc ~new_username/ sudo cp -rp ~bitnami/.profile ~new_username/
And modify the file /home/new_username/.ssh/authorized_keys as desired. Without any other changes, you should now be able to log into the server as "new_username" user with the "bitnami" user ssh private key.
If you want to add new public keys, you just need to edit the /home/new_username/.ssh/authorized_keys file and paste the content of the desired public key file. You could either do it using the SFTP/SCP client, or via command line when logged into the server:
cat ~/my_customer_public_ssh_key >> /home/new_username/.ssh/authorized_keys
To generate this key (the public and private key pair), depending on if you are on Unix or Windows, you can use:
- OS X and Linux
The command will ask for some information to generate the pair (basically the location and the password)
ssh-keygen -t rsa
- Windows
You can use PuttyGen. This page explains the process in detail
Use the 'bitnami' account
Backup your old authorized_keys:
$ cp /home/bitnami/.ssh/authorized_keys /home/bitnami/.ssh/authorized_keys.bak
Add your customer key to authorized_keys (PLEASE BE EXTREMELY CAREFUL to avoid losing ssh access at all)
$ cat ~/my_customer_public_ssh_key >> /home/bitnami/.ssh/authorized_keys
Now you both are able to access the machine as "bitnami".
You can revert the changes by removing the last line from the /home/bitnami/.ssh/authorized_keys file or by restoring the old authorized_keys file:
$ cp /home/bitnami/.ssh/authorized_keys.bak /home/bitnami/.ssh/authorized_keys

Comments