By default, Bitnami Virtual Appliance cannot be accessed through SSH. Not sure why they disable the SSH access but I think it’s more a security prevention. On this tutorial, we will guide you how to enable SSH on Bitnami Virtual Appliance. There are many appliances you can choose from. On this tutorial, I am using Bitnami MySQL Server appliance running on my Virtualbox. The virtual appliance is distributed in OVF format. You may want to have a look at how to open this OVF virtual appliance on Virtualbox or VMWare.
How to Enable SSH on Bitnami Virtual Appliance
Step 1. Download and run your appliance
You can either run the appliance on cloud server, or VMware. Please refers to the official documentation on how to run the virtual appliance.
- How to run Bitnami Virtual appliance on VMWare Workstation 12.5
- How to run Bitnami Virtual appliance on Virtualbox
Step 2. Configure SSH
Now, log in to your Bitnami appliance. Usually the default user for login is bitnami, password: bitnami. You will be asked to change the password on the first login. Now we need to remove the file sshd_not_to_be_run.
sudo rm -f /etc/ssh/sshd_not_to_be_run
Next, start and enable ssh service
sudo systemctl enable ssh sudo systemctl start ssh
Check the ssh status
sudo systemctl status ssh
bitnami@debian:~$ sudo systemctl status ssh ● ssh.service - OpenBSD Secure Shell server Loaded: loaded (/lib/systemd/system/ssh.service; disabled) Active: active (running) since Tue 2017-09-26 06:52:20 UTC; 6min ago Main PID: 1972 (sshd) CGroup: /system.slice/ssh.service ├─1972 /usr/sbin/sshd -D ├─1975 sshd: bitnami [priv] ├─1977 sshd: bitnami@pts/0 ├─1978 -bash ├─4317 sudo systemctl status ssh └─4318 systemctl status ssh Sep 26 06:52:27 debian sshd: pam_unix(sshd:session): session closed for user...ami Sep 26 06:52:31 debian sshd: gethostby*.getanswer: asked for "188.8.131.52.in..."A" Sep 26 06:52:31 debian sshd: Received disconnect from 192.168.1.5: 11: [preauth] Sep 26 06:52:39 debian sshd: gethostby*.getanswer: asked for "184.108.40.206.in..."A" Sep 26 06:52:39 debian sshd: Accepted password for bitnami from 192.168.1.5 ...sh2 Sep 26 06:52:39 debian sshd: pam_unix(sshd:session): session opened for user...=0) Sep 26 06:52:44 debian sudo: bitnami : TTY=pts/0 ; PWD=/home/bitnami ; USER=...ade Sep 26 06:52:44 debian sudo: pam_unix(sudo:session): session opened for user...=0) Sep 26 06:58:46 debian sudo: bitnami : TTY=pts/0 ; PWD=/home/bitnami ; USER=...ssh Sep 26 06:58:46 debian sudo: pam_unix(sudo:session): session opened for user...=0) Hint: Some lines were ellipsized, use -l to show in full.
At this point our SSH server is up and running. You can connect using your public key.
Configure SSH to use password authentication
After the steps above, you still won’t be able to connect to Bitnami Virtual Appliance via SSH using password authentication. Now we need to enable the password authentication. Please keep in mind that the public key authentication is way better than password authentication in term of security.
Edit the sshd_config
sudo nano /etc/ssh/sshd_config
Find the following line
Change it to this
Now close and save the file. (using CTRL + X) if you are using nano editor. Now restart ssh service
sudo systemctl restart ssh
Now try to log in from other computer via SSH. For example, I can log in from my other Linux box with this ssh command
Done. Thanks for reading this How to Enable SSH on Bitnami Virtual Appliance.