[SOLVED] Migration Tool Error

Discussion in 'Plugins/Modules/Addons' started by Slimat, Jan 6, 2023.

  1. Slimat

    Slimat Member

    Hi All
    I have just tried the Migration Tool for the first time, following the instructions provided.
    However, the first time I try to do a dry run it fails with an error;
    upload_2023-1-6_15-31-41.png
    I have checked and there is no/root/migration/conf/php/ioncube/ folder at all, so /root/migration/conf/php/ioncube/ioncube_loader_lin_7.4.so is NOT present.
    I have emailed support but could do with any help as the sites I am migrating have now been offline for about 4 hours waiting for this to happen.
    Any pointers gratefully appreciated.
     
  2. Slimat

    Slimat Member

    OK, a quick update... I re-ran using 'Sudo Su -' and the tool did start the dry run... I entered the target details and it reported "And I shall connect to 'xxx.xxx.xxx.xxx:8080/remote'... 'Is this correct? (y, n):' - I selected "y" and it has been sitting there with a cursor which allows me to type... so I am not sure whether its trialling a migration and will take hours, or whether its crashed out... any thoughts?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The tool continues to report what it is doing and you are in dry-run mode, so it would just report things anyway. I would stop it now and restart the dry run. If your ssh connection is instable, it might be useful to use the Linux screen command to run the migration tool session inside screen.

    Regarding "xxx.xxx.xxx.xxx:8080/remote", you entered it with https:// like this https://xxx.xxx.xxx.xxx:8080/remote, right?

    We did not receive any support message from you. Where did you send it?
     
  4. Slimat

    Slimat Member

    Hi Till

    I sent the request to migsupport [AT] ispconfig [DOT] org... maybe its gone into your junk folder?

    I hadnt realised that my target VPS has hung, so I rebooted and the mighration process has got a bit further - however I cant get past the stage where it tries to SSH into the target server. It errors with;

    Now we transfer the key to the target server.
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa_migration.pub"
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    [email protected]: Permission denied (publickey).

    On the target server I have edited '/etc/ssh/sshd_config' and uncommented:
    #PermitRootLogin prohibit-password
    I have tried:

    PermitRootLogin without-password
    Also;
    PermitRootLogin yes

    Both configurations report Permission denied (publickey) on the source server.

    I dont believe the target needs a reboot after editing /etc/ssh/sshd_config otherwise the source server would disconnect... or am I mistaken?
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Use:

    PermitRootLogin yes

    at least for the migration as the ssh copy id command can not copy the key otherwise.

    You don't have to reboot, but you must restart the ssh daemon and probably restart the migration.
     
  6. Slimat

    Slimat Member

    Thanks Till,

    I have set 'PermitRootLogin yes' in /etc/ssh/sshd_config, but still get the same error;

    What is the ip for the target web server to connect via SSH? [xxx.xxx.xxx.xxx]:
    What is the SSH port? [22]:

    Now we transfer the key to the target server.
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa_migration.pub"
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    [email protected]: Permission denied (publickey).​

    After setting PermitRootLogin yes I rebooted the Target server, then restarted ./migrate on the source server.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Do you have any files in the folder /etc/ssh/sshd_config.d/ on the new server which might override the configuration in /etc/ssh/sshd_config file?
     
  8. Slimat

    Slimat Member

    Its a clean install of Ubuntu 20.04, so I am not aware of anything that would override these settings.
    There is only one file in /etc/ssh/sshd_config.d/... custom.conf
    When I open it, it says "# Created by the ISPConfig autoinstaller on 2023-01-05".

    That is the only visible file in this folder.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please delete that custom.conf file and try again.
     
  10. Slimat

    Slimat Member

    Hi Till

    I deleted the custom.conf file and get the same error;
    Permission denied (publickey).
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you restart the ssh server on the new system after deleting it?
     
  12. Slimat

    Slimat Member

    Yes, I rebooted the target server
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the result of the command:

    ls -la /etc/ssh/sshd_config.d/

    and post the whole /etc/ssh/sshd_config file. (you can rename it to.txt and attache it to the post or zip it, if it#s too long to post it inline).
     
  14. Slimat

    Slimat Member

    upload_2023-1-7_11-37-28.png
     

    Attached Files:

  15. till

    till Super Moderator Staff Member ISPConfig Developer

    Change:

    PasswordAuthentication no

    to

    PasswordAuthentication yes

    and restart plus you might want to delete the while migration tool folder on the old system and restart from scratch by downloading it, so the tool will also create a new ssh key pair.
     
  16. Slimat

    Slimat Member

    Is this the /migration/ispconfig_migration_toolkit directory?
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    yes. Run:

    rm -rf /root/migration

    and then re-download it:

    Code:
    cd /root
    mkdir migration
    cd migration
    wget https://www.ispconfig.org/downloads/ispconfig_migration_toolkit-latest.zip
    unzip ispconfig_migration_toolkit-latest.zip
    mv ispconfig_migration_toolkit/ispc3-migration-tool-*.tar.gz /root/migration/migtool.tar.gz
    tar xzf migtool.tar.gz
    rm -f migtool.tar.gz
     
  18. Slimat

    Slimat Member

    Thanks, this looks more promising - I now get;

    Now we transfer the key to the target server.
    /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa_migration.pub"
    /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
    /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
    [email protected]'s password:

    However, I connect to my VPS using a private key, so I actually dont have a password - but this is not your concern... I will speak to my Ubuntu guru to see how to create a root password... unless there is a way to import my private key into the migration tool?

    Many thanks for the help ;)
     
  19. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    You can find the public key that the tool created in the /root/.ssh/ directory. It will have migration in the name. Copy that public key manually to the authorized_keys file on the target.
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    Either do, what @Th0m suggested or set a root password on the new server by running the command:

    passwd root

    there or configure your systems to allow root access by ssh from old to new server, in that case the Linux ssh-copy-id command will also not ask for the root password.
     

Share This Page