Atavism Linux Server Install – Secured

Setting up an SSH tunnel configuration for MySQL using PuTTY on Windows allows you to securely connect to a remote MySQL server through an encrypted SSH connection. Here is a step-by-step guide on how to set up a machine SSH tunnel configuration for MySQL using PuTTY:

Step 1: Download and install PuTTY If you haven’t already, download and install the PuTTY client on your Windows machine. You can download the latest version from the official website: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Step 2: Configure a new session in PuTTY Open the PuTTY client and configure a new session by entering the following information:

  • Host Name: Enter the hostname or IP address of the remote MySQL server you want to connect to.
  • Port: Enter the SSH port number for the remote MySQL server (usually 22).
  • Connection type: Select “SSH” as the connection type.

Step 3: Configure SSH tunnel settings in PuTTY In the left-hand menu, navigate to Connection -> SSH -> Tunnels. Here, you will configure the SSH tunnel settings for MySQL:

  • Source port: Enter a local port number that will be used to connect to the remote MySQL server (e.g. 3306).
  • Destination: Enter the hostname or IP address of the remote MySQL server, followed by the MySQL port number (e.g. 127.0.0.1:3306).
  • Click the “Add” button to add the SSH tunnel configuration to the list.

Step 4: Save the session settings Navigate back to the “Session” screen and give the session a name (e.g. “MySQL via SSH”). Click the “Save” button to save the session settings.

Step 5: Connect to the remote MySQL server Double-click the saved session to connect to the remote MySQL server through the SSH tunnel. Enter your SSH username and password when prompted.

Step 6: Connect to MySQL from the local machine Once the SSH connection is established, you can connect to the MySQL server from your local machine using a MySQL client (e.g. MySQL Workbench or HeidiSQL). In the client, enter the following settings:

  • Hostname: Enter “localhost” as the hostname.
  • Port: Enter the local port number you configured in Step 3 (e.g. 3306).
  • Username and Password: Enter your MySQL username and password.

Congratulations! You have successfully configured an SSH tunnel for MySQL using PuTTY on your Windows machine. This allows you to securely connect to a remote MySQL server through an encrypted SSH connection.