Support /
Knowledge Base

Connect To A HA Slave Machine Using SSH Tunneling


The HA slave machine is not directly accessible while the master is still running . So in order to be able to access different features on the slave you need to establish a tunnel . A very useful tool for connecting to a HA slave machine is ssh tunneling . Below there is a description on how you can use ssh tunneling on various operating systems .

ON LINUX:

  • Open a terminal: xterm, gnome-terminal or KonsoleTo establish a ssh
  •  To establish a ssh tunnel use :

           ssh root@MATER_IP -L LOCAL_PORT:127.9.0.2:SLAVE_LOCAL_PORT.

This command opens a ssh tunnel between you and the slave through the master. The SLAVE_LOCAL_PORT can now be accessed through the LOCAL_PORT on your machine .
For example to access the web interface (https service – port 443) on the slave you can use :
            ssh root@MASTER_IP -L 12345:127.9.0.2:443
You can now access the slave web interface by opening a browser and going to the following address : https://localhost:12345 .

ON MAC:

  •   Open a terminal: Terminal.app or iTerm.app.
  •   To establish a ssh tunnel use : ssh root@MATER_IP -L LOCAL_PORT:127.9.0.2:SLAVE_LOCAL_PORT
To access a certain service on the slave you can use the same method as the one used for linux operating systems.

ON WINDOWS:

Download putty from www.chiark.greenend.org.uk/~sgtatham/putty/download.html . This will be used for establishing the ssh connection .
Follow the steps in the images below to properly set up putty :