Discover Centmin Mod today
Register Now

Install (RESOLVED) SSH connections "after the instalation of Centmin" with OVH

Discussion in 'Install & Upgrades or Pre-Install Questions' started by EckyBrazzz, Nov 28, 2019.

  1. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:28 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    Did you do that with more than 1 key ? as single > pipe or double >> ? A single > will overwrite the .ssh/authorized_keys file with the latest cat so any keys you had in that file previously would be deleted as opposed to >> which will append to file, keeping previous entries intact in .ssh/authorized_keys. Usual method of populating .ssh/authorized_keys with your SSH key is via ssh-copy-id command.


    Not sure what you're doing wrong, every day I create hourly VPS with SSH keys to do Centmin Mod install/testing without issue using SecureCRT.
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:28 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    be sure you're using the right /root/.ssh/authorized_keys file and not authorized_keys2 file

    Code (Text):
    grep -rin authorized /etc/ssh/
    /etc/ssh/sshd_config:45:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config:46:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config:47:AuthorizedKeysFile .ssh/authorized_keys
    /etc/ssh/sshd_config:49:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config:51:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config:52:#AuthorizedKeysCommandUser nobody
    
     
  3. EckyBrazzz

    EckyBrazzz Active Member

    917
    190
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +363
    Local Time:
    6:28 AM
    Latest
    Latest
    I don't know where to look anymore, it still gives me an error, only password
    And they are dedicated machines, not VPS.

    First OVH
    Code (Text):
    grep -rin authorized /etc/ssh/
    /etc/ssh/sshd_config-backup:46:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config-backup:47:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config-backup:48:AuthorizedKeysFile       .ssh/authorized_keys
    /etc/ssh/sshd_config-backup:50:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config-backup:52:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config-backup:53:#AuthorizedKeysCommandUser nobody
    /etc/ssh/sshd_config-backup.060220-055246:46:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config-backup.060220-055246:47:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config-backup.060220-055246:48:AuthorizedKeysFile .ssh/authorized_keys
    /etc/ssh/sshd_config-backup.060220-055246:50:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config-backup.060220-055246:52:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config-backup.060220-055246:53:#AuthorizedKeysCommandUser nobody
    /etc/ssh/sshd_config:34:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config:35:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config:36:AuthorizedKeysFile      .ssh/authorized_keys
    /etc/ssh/sshd_config:37:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config:38:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config:39:#AuthorizedKeysCommandUser nobody
    


    SECOND OVH
    Code (Text):
    grep -rin authorized /etc/ssh/
    /etc/ssh/sshd_config:45:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config:46:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config:47:AuthorizedKeysFile      .ssh/authorized_keys
    /etc/ssh/sshd_config:49:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config:51:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config:52:#AuthorizedKeysCommandUser nobody
    


    UPCLOUD
    Code (Text):
    grep -rin authorized /etc/ssh/
    /etc/ssh/sshd_config:34:# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
    /etc/ssh/sshd_config:35:# but this is overridden so installations will only check .ssh/authorized_keys
    /etc/ssh/sshd_config:36:AuthorizedKeysFile      .ssh/authorized_keys
    /etc/ssh/sshd_config:37:#AuthorizedPrincipalsFile none
    /etc/ssh/sshd_config:38:#AuthorizedKeysCommand none
    /etc/ssh/sshd_config:39:#AuthorizedKeysCommandUser nobody
    


    I do many installs , but only OVH gives troubles. One is a install from UpCloud, the other OVH.

    On OVH I had deleted some files and set file permissions correct. They had root:root instead of root:ssh_keys
    And there was a backup key at OVH, that I deleted.
    upload_2020-2-7_0-9-52.png
     
    Last edited: Feb 8, 2020
  4. eva2000

    eva2000 Administrator Staff Member

    58,895
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    7:28 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    user:group being root owned is correct on all servers I have SSH keys setup for
    Code (Text):
    ls -lah /root/.ssh
    total 12K
    drwx------   2 root root 4.0K Nov 20  2018 .
    dr-xr-x---. 11 root root 4.0K Feb  6 23:09 ..
    -rw-------   1 root root  176 Nov 20  2018 authorized_keys
    
     
  5. EckyBrazzz

    EckyBrazzz Active Member

    917
    190
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +363
    Local Time:
    6:28 AM
    Latest
    Latest
    @eva2000 I think you misunderstood me.

    In /etc/ssh/ I had to change ownership and delete backup files. The rest is the same on UpCloud & OVH now.

    I ordered these servers end November 2019, so I really check and double-checked it. Happy that I re-rented (sold) several of these servers.

    Strange thing is that after the installation of CMM this happens.