This article walks you through the installation of the SSH Gateway on OSX. Once you have downloaded the appropriate file for your distribution, please upload this to your server and access the server to install.
Step 1. Pre-requisites
The SSH Gateway requires a Java 7 or greater runtime installed. This is included as part of the product download so the only thing left to do is to verify that the ports you want the services to run on are available.
The server provides an administrative interface that is accessible using your browser so you should ensure that no other HTTP server is already running on the machine or you have chosen some alternative ports such as 8080/8443 for them to listen on.
Similarly an SSH server is also installed as part of this product and will attempt to listen on port 22. If you need this to co-exist with another SSH server already running on that port you can install the product as normal and change the SSH port once you have access to the administrative user interface.
Step 2. Install
The installation is a typical wizard installer guiding you through the process and prompting you for information when needed. When you first open the DMG file double click on the icon to start the installer. You will be presented with a prompt stating the application was downloaded from the internet and that it requires you to confirm you want to open the application. Click Open to confirm.
Then the application will request raised privileges so the installation can make changes to your system. Enter your password and click OK to continue, clicking Next on the first installer dialog.
Next, accept the license agreement and you will then have the option to change the default installation directory before the installation proceeds. There is no need to install this into /Applications as there is no GUI component and the server runs as a system service controllable through launchctl.
After the installation of the files you will have the option to set the HTTP ports used by the service. Set your chosen ports and click Next.
Next you will have the option to setup the database where all your settings will be stored. The default setting of Built-in should be perfectly fine for most installations. Changing the database is an Advanced option and requires further external configuration of your database. Only select these options if you are experienced with using the database selected.
After selecting the database type the installer is ready to start the service. After clicking Next the installer will wait for the service to start. It could take some time and the screen will allow up to two minutes to wait for the service to respond to HTTP requests.
Once the service has started the installer will present you with a summary screen giving you a browser link to the administrative interface. Clicking on this link takes you to the login screen where you can login for the first time. To complete the installation click Next and then Finish on the final page.
Step 3. Stopping and Starting the Server
You can control the SSH Gateway service through launchctl. To stop the service use the following command:
sudo launchctl stop com.sshtools.Gateway
To start the service use:
sudo launchctl start com.sshtools.Gateway
You have now installed the SSH Gateway server on your OSX distribution. The server provides an administrative interface that runs on port 443 of the server (or the port you configured during installation). You can now connect to the user interface using the url https://<hostname>/ where <hostname> is the ip, hostname or FQDN of the server you have installed using this articles instructions.
You should be presented with a login screen after connecting to the URL. You should login using the default administrative credentials:
You will be prompted to change the admin password after logging in for the first time.