Documentation Home
MySQL Shell for VS Code

MySQL Shell for VS Code  /  ...  /  Configure a Connection Using SSH Tunneling

Pre-General Availability: 2024-05-21

4.2.4 Configure a Connection Using SSH Tunneling

To tunnel a connection using SSH:

  1. Select mysql from the Database Type list. Provide a caption and a description to identify the connection.

  2. In the Basic tab, enable Connect SSH Tunnel. This action opens the SSH Tunnel tab.

  3. In the SSH Tunnel tab, do the following:

    • Specify a valid URI in the SSH URI field. Your URI consists of your SSH user name, the SSH host name, and the port number on which the host listens. For example:


    • Locate the SSH Private Key File field and then navigate to where the id_rsa file is stored on your system.

    • If needed, specify an alternative path in Custom Path for the SSH Configuration File.

    • Click OK.

If a remote host is missing from the system's list of known hosts, a prompt requires you to confirm the host's fingerprint before storing it. If your stored host fingerprint is different than the host's current fingerprint, then an error is generated and you are required to handle the discrepancy from outside of MySQL Shell for VS Code before creating the connection.

On Linux and macOS, SSH host fingerprints are stored in ~/.ssh/known_hosts. On Microsoft Windows, they are stored in a file under the user's folder, such as C:\Users\username\.ssh\known_hosts.