HAProxy ALOHA Load Balancer SSH public key access
Target network diagram
The client uses SSH to get connected to the Aloha.
Client side configuration
To do only if you don’t currently have a SSH key.
1. Generate the key pair with the command ssh-keygen –t rsa:
user:~$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/home/user/.ssh/id_rsa): Created directory '/home/user/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/user/.ssh/id_rsa. Your public key has been saved in /home/user/.ssh/id_rsa.pub. The key fingerprint is: 9a:1a:37:da:11:0b:9f:0e:fb:e8:b4:93:46:f8:3d:ec user@krusty The key's randomart image is: +--[ RSA 2048]----+ | | | | | | | | | .. . S | | . .o * | | o++X | | .=%+o | | oB+E. | +-----------------+
Since our purpose is to get connected to the Aloha without typing anything, we don’t enter a passphrase.
Bear in mind that if somebody manage to steal your private Key, then he would be able to get connected to the Aloha too.
2. Upload your pubic key to the Aloha:
user:~$ scp .ssh/id_rsa.pub email@example.com:/tmp/ firstname.lastname@example.org's password: id_rsa.pub 100% 393 0.4KB/s 00:00
Get connected on the Aloha through SSH:
user:~$ ssh email@example.com firstname.lastname@example.org's password: admin@ALOHA1:~$
Get root access:
Copy the user’s public key into authorized keys dir:
root@ALOHA1:~# cp /tmp/id_rsa.pub /etc/ssh/authorized_keys/admin
To add a key, just concatenate it to the end of the file:
root@ALOHA1:~# cat /tmp/id_rsa.pub >> /etc/ssh/authorized_keys/admin
SSH public key access
This application note is intended to help you access the Aloha load balancer through SSH using your public key.
Be able to remotely access the Aloha load balancer without typing a password.
v3.6 and later