• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved Plesk not allow SSH connection from cPanel transfer tool

Stergios G

Basic Pleskian
Server operating system version
CentOS Linux 7.9.2009 (Core)
Plesk version and microupdate number
Plesk Obsidian Version 18.0.48
Hi all,
i try to transfer an account from Plesk to cPanel via cPanel transfer tool but i get the error:
(XID 4q6epf) The system failed to connect to “plesk_server_ip” on port “22” because of an error: Connection refused Failed to establish session and parse security token: 599 Internal Exception (Could not connect to 'plesk_server_ip': Connection refused)
I spoked with cPanel support and they said: make sure that Plesk allow SSH connection from cPanel server.
what i did:
  1. First check was if i can connect via SSH with root pass via WinSCP or Putty => which connected successfully
    • With WinSCP i edited the etc/ssh/ssh_config file. => added: PasswordAuthentication yes, PermitRootLogin yes => restart ssh services
  2. Firewall => ensure that SSH connections are accepted
    • SSH (secure shell) server => Allow incoming from all
    • Incoming connections from cPanel server => Allow incoming from cPanel_server_ip on all ports
    • I disabled even Plesk firewall, with no results
PS: i don 't known if it is important, but SSH port for cPanel it is: 2222, not 22

Is something else than can i check?
Tnx a lot
 
It's worth checking if the IP of your cPanel server isn't block/listed by Fail2Ban on you Plesk server. If it isn't, can you manually connect over SSH from your cPanel server to your Plesk server?
 
It's worth checking if the IP of your cPanel server isn't block/listed by Fail2Ban on you Plesk server. If it isn't, can you manually connect over SSH from your cPanel server to your Plesk server?
Thnx for your reply, it is on white list on Fail2Ban.
But
When i try to connect from whm terminal to plesk ssh i got this:

Code:
[root@hs21 ~]# ssh [email protected]
ssh: connect to host 116.202.235.167 port 2222: Connection refused
[root@hs21 ~]# ssh [email protected]
ssh: connect to host 116.202.235.167 port 22: Connection refused
i changed and tried different port in case something change but NO.
 
Port 22: Please also check whether your data center operates a firewall outside your server. Some do and are blocking port 22 by default.

What is the reason you are transferring away from Plesk? And would it not be cPanel support task to help you migrate to cPanel? As you said above, in Plesk ports are open.
 
Hi Peter Debik
i will check if something happened with firewall outside server or port policy, but i don't think is there any firewall, and i have tried with differents ports

What is the reason you are transferring away from Plesk? And would it not be cPanel support task to help you migrate to cPanel? As you said above, in Plesk ports are open.
My company maintains hosting servers with both Plesk and cPanel

This Plesk server is a dedicated server. Ηosts two websites. Two companies with the same owner. One company - website is gone close, and he want to pay lower for the other site, and my company have a share hosting with cPanel. I transferred the website manual but i want to transfer and the 17 email accounts and i don 't want to transfer those manual.

Before asked help from here, i asked from cPanel. I have opened support ticket on cPanel and Plesk at the same time.

cPanel said it 's a Plesk issues (connection refused from Plesk), Plesk it 's a cPanel problem (ssh connections are establish from others IPs so Plesk it s open for SSH connections) and i am in the middle.
 
According to the ticket it was already tested and proven that port 22 is open and your Plesk server can be fully accessed through an SSH connection on port 22. In the ticket it was also made clear that the requestor IP is not banned by fail2ban. Have you also tried the advice of doing a tcpdump while trying to connect from your cPanel server?
 
According to the ticket it was already tested and proven that port 22 is open and your Plesk server can be fully accessed through an SSH connection on port 22. In the ticket it was also made clear that the requestor IP is not banned by fail2ban. Have you also tried the advice of doing a tcpdump while trying to connect from your cPanel server?
Yes Peter but,
tcpdump -i eth0 -nnnn port 22 and src <cPanel_IP>
According the ticket "eth0 is the main NIC" i try to understand what NIC is and were i can find it, i suppose is the server name.
so when i type on CLI a get this:
-bash: line 10: tcpdump: command not found
install tcpdump
yum install tcpdump
installed => run again
tcpdump: hs101: No such device exists
so hs101 it is not the NIC. Can you tell me pls where i can find NIC?
 
The easiest way to find the active NIC is to go to "Tools & Settings" > "Tools & Resources" > "IP Addresses" and check he column "Interface".
 
In WHM navigate to IP Functions > Show or Delete Current IP Addresses. The first column shows the interface (NIC). Which usually is eth0, but can be different number.
 
Well well well, something now is more clear.
i ran the command
tcpdump -i enp340s0 -nnnn port 22 and src <cPanel_IP>
and all most instant i tried to connect via WHM terminal:
But nothing capture:
0 packets captured
0 packets received by filter
0 packets dropped by kernel
So NOTHING is coming from cPanel IP, is that right?

But because i am not an easy believer i tried to capture ssh connections from other servers (all Plesk). And that happened!
I captured all try connections even if connection refused <= i don 't care why for now.

So cPanel connection NEVER reaches on Plesk server.
Is that right?
 
Back
Top