The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remote mysql server setup - ssh for setup only?

Discussion in 'General Discussion' started by Alcedema, Oct 4, 2009.

  1. Alcedema

    Alcedema Member

    Joined:
    Mar 14, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  2. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    414
    Likes Received:
    4
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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.
     
  3. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    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.
     
  4. Alcedema

    Alcedema Member

    Joined:
    Mar 14, 2008
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    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
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    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
     
Loading...

Share This Page