If your MySQL instance requires an SSH connection, we recommend you generate a Polytomic-only SSH key pair. The steps below describe how to do this for Ubuntu environments.
- Create a user account for Polytomic.
[email protected]:~$ sudo adduser polytomic --disabled-password Adding user `polytomic' ... Adding new group `polytomic' (1001) ... Adding new user `polytomic' (1001) with group `polytomic' ... Creating home directory `/home/polytomic' ... Copying files from `/etc/skel' ... Changing the user information for polytomic Enter the new value, or press ENTER for the default Full Name : Room Number : Work Phone : Home Phone : Other : Is the information correct? [Y/n]
- Switch to the Polytomic user and generate an SSH key pair.
[email protected]:~$ sudo su polytomic [email protected]:/home/ubuntu$ cd ~ [email protected]:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/polytomic/.ssh/id_rsa): Created directory '/home/polytomic/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/polytomic/.ssh/id_rsa Your public key has been saved in /home/polytomic/.ssh/id_rsa.pub The key fingerprint is: SHA256:ofESkNzrFipL3Dq39csjkHoFg3my2UDPuOEPVGO22IA [email protected] The key's randomart image is: +---[RSA 3072]----+ | . ..o | |E o B.. | | . & oo.. | | X O o= . | | + @ *o.S | | X * +. | | . B +. | | = +..o. | | +.. .+o | +----[SHA256]-----+
/home/polytomic/.ssh/id_rsa will now contain the SSH private key needed for Polytomic to connect.
- Authorize the public key for the
- Create a new MySQL connection in Polytomic. Tick the 'Connect over SSH Tunnel?' box to reveal SSH configuration fields.
Fill in the SSH configuration fields. Paste the contents of your private key file (
/home/polytomic/.ssh/id_rsain our example above) into the 'Private key' text field.
Updated about 1 year ago