First of all, I assume you're already familiar with SSH and use PuTTy to open SSH connections from Windows. If you haven't come across Putty yet, then take a look at https://www.putty.org/
Right now, I supose you have a putty connection configured and you can connect to your server over SSH with a private key with no problems...
Port Forwarding on PuTTY
On my developer station (local IP 192.168.0.53), I just have a SqlServer installed and have been using the port 1433. So, I'll use another port (I'll be using 1434 below as an example). Now, we need to configure PuTTY to forward traffic from the local port 1434 to port 1433 on the database server.
Navigate to Connection -> SSH -> Tunnels and enter the settings:
- Source: 1433
- Destination port: 192.168.0.53:1434 (your internal IP Address)
- Type: Local
- And click "Add"
Save your session and leave it open. Now, configure your connection string application, use a Management Studio, Azure Data Studio or whichever database you wish...
PS: If you are using a not Default SQLServer port, use this example 👆(ip comma port) and be happy.