Remote mysql server setup - ssh for setup only?

Alcedema

Member
Mar 14, 2008
10
0
51
I'm trying to set up a remote mysql server and am having issues getting WHM to key into the remote server and su (i can do it manually from putty from one server to the other root -> user) but whm doesn't want to.

But anyway, is SSH only for the initial setup of the remote server or is it continually used to set up/backup from then on?

If the former then I can just use root->root for setup. If not I'll have to spend another few hours trying to figure out a way to get this working..

Thanks,

-Tim
 

DomineauX

Well-Known Member
PartnerNOC
Apr 12, 2003
429
11
168
Houston, TX
cPanel Access Level
Root Administrator
I'm trying to set up a remote mysql server and am having issues getting WHM to key into the remote server and su (i can do it manually from putty from one server to the other root -> user) but whm doesn't want to.

But anyway, is SSH only for the initial setup of the remote server or is it continually used to set up/backup from then on?

If the former then I can just use root->root for setup. If not I'll have to spend another few hours trying to figure out a way to get this working..

Thanks,

-Tim
I would look to setup public key authentication and allow root to login to SSH directly via key with "PermitRootLogin without-password" in /etc/ssh/sshd_config.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,214
13
313
Houston, TX
cPanel Access Level
Root Administrator
Also make sure you can login from the WHM server to the MySQL server via SSH (ssh to the WHM server then ssh from WHM server to the remote MySQL server). Your ability to directly login to the MySQL server doesn't do much to ensure WHM can connect to that server.
 

Alcedema

Member
Mar 14, 2008
10
0
51
I was connecting the two machines via ssh just fine, I set up the ssh key from WHM root to a user on the sql server. It just always said the password was incorrect, which it wasn't.

I would also prefer to not have root -> root keys enabled for security reasons, especially to our database server. So our best bet is root -> user and then using sudo.

Mind you, is there a list of commands that will need to be run by the remote user with sudo?

Thanks,
-Tim
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,214
13
313
Houston, TX
cPanel Access Level
Root Administrator
I was connecting the two machines via ssh just fine, I set up the ssh key from WHM root to a user on the sql server. It just always said the password was incorrect, which it wasn't.

I would also prefer to not have root -> root keys enabled for security reasons, especially to our database server. So our best bet is root -> user and then using sudo.

Mind you, is there a list of commands that will need to be run by the remote user with sudo?

Thanks,
-Tim
This presentation from the 2008 cPanel Conference will shed light on what is done as part of the remote MySQL server configuration/setup process:

http://docs.cpanel.net/twiki/pub/Al...rces/TrainingSlides07/MySQL_Remote_Server.pdf