Want more timely Centmin Mod News Updates?
Become a Member

Stable Branch update centmin.sh menu option 21 routines in 131.00stable

Discussion in 'Centmin Mod Github Commits' started by eva2000, Feb 16, 2025.

  1. eva2000

    eva2000 Administrator Staff Member

    55,381
    12,255
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,835
    Local Time:
    11:52 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    update centmin.sh menu option 21 routines in 131.00stable

    - update centmin.sh menu option 21 routine for generated restore-instructions.txt text
    - update centmin.sh menu option 21 backup generated restore.sh script when you select centmin.sh menu option 21 submenu option 3 for Migrate Centmin Mod Data To New Centmin Mod Server option and you select mysqldump method instead of mariabackup method for MariaDB Mysql data backups. The restore.sh script needed a fix for individual database name restore command options in restore.sh that is generated
    - update centmin.sh menu option 21 submenu option 1 option 3 for creating new SSH key for remote host. Previously, when it comes time to transfer the new generated SSH key's public key file to the remote host via ssh-copy-id, if the ssh-copy-id process fails, the routine will automatically remove the generated SSH key pairs' private and public key files. This update will improve the routine so that on ssh-copy-id failed transfer, prior to removing the SSH key pairs private and public key files, it will show the contents of both private and public key files. This can save time if you had a temp remote SSH server issue or restriction i.e. firewall or root user SSH restriction on remote host, and you do not want to re-run centmin.sh menu option 21 submenu option 1's option 3 again as you can use the displayed contents to manually recreate the SSH private and public key file contents.

    From centmin.sh menu option 21 submenu option 1

    --------------------------------------------------------------
    Manage SSH Keys
    --------------------------------------------------------------
    Uses keygen.sh tool https://github.com/centminmod/keygen
    --------------------------------------------------------------
    1). List Registered SSH Keys
    2). Register Existing SSH Keys
    3). Create New SSH Key For Remote Host
    4). Use Existing SSH Key For Remote Host
    5). Rotate Existing SSH Key For Remote Host
    6). Delete Existing SSH Key For Remote Host
    7). Export Existing SSH Key
    8). Backup All Existing SSH Keys
    9). Back to Main menu
    --------------------------------------------------------------
    Enter option [ 1 - 9 ] 3


    example of updated ssh-copy-id failed routine now showing the SSH key pairs' contents prior to removal

    /bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

    ssh-copy-id transfer failed: removing generated SSH key files

    remove /root/.ssh/my1.key
    -----BEGIN OPENSSH PRIVATE KEY-----
    b3Blbn*******hhWjq5U7l/kZ1Nx8/04gc6BWjaYqH23F/4IZ
    LYV8RilR6yrdH3IRN1o2AAAACW92aDJpbmtleQECAwQ=
    -----END OPENSSH PRIVATE KEY-----
    remove /root/.ssh/my1.key.pub
    ssh-ed25519 AAAAC3Nz*******1o2 comment

    Continue reading...

    132.00stable branch