Thank you for waiting.
I have been on support myself with my Hosting Company Sitegrounds since I took on this ticket. I don’t think I will be able to make a video on how to use SSH Tunnel to connect at this time. I have gone over my entire setup with Siteground and they have confirmed that all settings within CG are correct but I am getting an error “Lost connection. The connection to your MySQL server was lost or killed.”
So far I know how to correctly generate Private/Public Keypairs, Upload them and get CG to connect via SFTP
This would be the best solution to lessen the amount of KeyPairs you would need to generate in order to connect to your Child Sites SFTP at least.
I can also tell you the correct information to enter into CG SSH Tunnel in order to connect but it’s simply not working at this time for my server; It may for yours… Update found out why waiting for answer from SG
I’m sorry I don’t have a better answer for you at this moment. SSH is not a novice task & sometimes you have to work with your Hosting company if things don’t work right away.
In the mean time,
You can simply use MySQL Direct to connect to the Database. You would only need your wp-config.php credentials to connect. That’s what I am currently doing myself.
So you have the same information I do - These are the steps I took to connect via SSH Tunnel
Private Key (Note: CodeGuard only supports unencrypted RSA and DSA keys so do NOT use a passphrase when asked )
1.) Create a Public/Private Keypair via ssh-keygen ( So you are not forced by your host to Encrypt it with a passphrase; most do )
https://www.screencast.com/t/ru0s9d9ffSR
Within Windows PowerShell OR Linux Terminal type the command:
$ ssh-keygen -t rsa
Open those two files in a Text Editor of your choice
id_rsa is your Private Key that you use on CG
id_rsa.pub is your Public Key that you put on your server
2.) Install the public key as an authorized key on your server
Log into cPanel
search for SSH
upload your Public Key
3.) Upload your Private key to CodeGuard
Username is your cPanel Name
Password is your cPanel Password
[Siteground Caviat] - SSH port is 18765
Database Connection
4.) Whitelist CG within MySQL
Go back to cPanel
Search for “Remote MySQL”
Add CG IPS
54.174.115.171
54.174.153.212
54.174.91.34
54.236.233.28
54.236.233.46
5.) Open your Wp-config.php for MySQL Creds
Database Hostname: Usually your server IP
Enter in Database Name
Enter in Database Password
MySQL Port keep 3306
ssh username cPanel
ssh password cPanel
click add private key & paste your private key in again
[Siteground Caviat] - SSH port is 18765
[Siteground Caviat] - Database Hostname Not Server IP ( see "Remote MySQL" cPanel Tool )