Applicable to:
- Plesk for Linux
Symptoms
-
Migration via SSH key fails with one of the following errors in Tools & Settings > Migration and Transfer Manager:
PLESK_ERROR: Failed to connect to the source server 'source' (203.0.113.2) by SSH: encountered RSA key, expected OPENSSH key
PLESK_ERROR: Failed to check SSH connection to the source server 'source' (203.0.113.2): q must be exactly 160, 224, or 256 bits long
PLESK_ERROR: Failed to check SSH connection to the source server 'source' (203.0.113.2): p must be exactly 1024, 2048, or 3072 bits long
-
Paramiko version 2.9 or above is installed on the target server:
Debian-based OS (Debian, Ubuntu, etc.):
# dpkg --list | grep paramiko
ii plesk-py27-paramiko 2.10.3-ubuntu.20.04.220330.1131 amd64 SSH2 protocol libraryRPM-based OS (CentOS, RHEL, CloudLinux, AlmaLinux, etc.):
# rpm -qa | grep paramiko
plesk-py27-paramiko-2.10.3-1centos.7.220330.1131.x86_64 -
OpenSSH version 5.9 or lower is installed on the source server:
# ssh -V
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013
Cause
Product issue:
- #PMT-5041
Workaround
Regardless of which Linux distributive is in use, before applying the personalized steps below, add the SSH-RSA support to the SSH client's config file at /etc/ssh/ssh_config
- Connect to the target server via SSH;
-
open the file
# vi /etc/ssh/ssh_config
-
Add the following line
# PubkeyAcceptedKeyTypes +ssh-rsa
-
On Plesk's PMM repository, find the folder for your Linux Distribution and get the URL for Paramiko 2.7.
-
Replace the URL from the command below and fetch the Paramiko package:
# wget http://autoinstall.plesk.com/PMM_0.1.11/dist-deb-Debian-10.0-x86_64/packages/plesk-py27-paramiko_2.7.1-debian.10.200520.1813_amd64.deb
-
Downgrade Paramiko with the following commands:
# dpkg -r --force-depends plesk-py27-paramiko
# dpkg -i plesk-py27-paramiko_2.7.1-debian.10.200520.1813_amd64.deb
-
Connect to the target server via SSH;
-
On Plesk's PMM repository, find the folder for your Linux Distribution and get the URL for Paramiko 2.7.
-
Remove the current paramiko package from the server:
# rpm -e plesk-py27-paramiko --nodeps
-
Replace the URL from the command below with the one from step 2 and install the Paramiko package:
# rpm -i --nodeps http://autoinstall.plesk.com/PMM_0.1.11/dist-rpm-CentOS-7-x86_64/packages/plesk-py27-paramiko-2.7.1-1centos.7.200210.1834.x86_64.rpm
Comments
1 comment
When running the last command, I got an error
I needed to download the package plesk-py27-pycrypto also :
And then install both packages :
Please sign in to leave a comment.