Results 1 to 21 of 21
  1. #1
    Join Date
    Mar 2007
    Posts
    239

    cPanel: Connecting to Remote Server Failed

    Hi Guys,

    I am trying to use the "Copy an account from another server" feature in WHM.

    I have the following setup:

    Server A (contains account I wish to copy)
    Server B (this is the server I wish to copy to)

    However, when I enter the details of the server B in server A's WHM, I get the following error:

    "Connecting to Remote Server Failed: Unable to connect to xx.xx.xxx.98:1213: Connection refused "

    However, I am able to connect from server B's WHM to server A.

    I know that the SSH ports are correct.

    What could be the issue?

  2. #2
    Are you connecting to remote server as user root or else?

  3. #3
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by sysgallery View Post
    Are you connecting to remote server as user root or else?
    Yes, I will be connecting as root. However WHM spits out this error before any connection attempt is made (i.e. before I enter root login). It seems to check if the SSH port exists and is accessible first.

  4. #4
    Just try to flush the firewall in Server B and then try once.

  5. #5
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by sysgallery View Post
    Just try to flush the firewall in Server B and then try once.
    Same error

  6. #6
    I think you should need to contact your host as they may have to allow your IP from connecting access.
    Support Facility | 24/7 web hosting technical support services
    Technical support | Server management | Data migration

    Technical Articles

  7. #7
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by inspiron View Post
    I think you should need to contact your host as they may have to allow your IP from connecting access.
    These are both dedicated servers...

  8. #8
    Join Date
    Apr 2009
    Location
    Athens,Greece
    Posts
    105
    i had found an article at the past i use it some times i paste it
    Hello. I am writing this tutorial because this is a solid method I have used in the past for easily migrating cPanel accounts from one server to another. Using this method, you can transfer accounts from an old server, to a new one, help customers from another host move to your host, etc. This method is very simple, and does not even require root access on one end of the migration. I have found the "Transfer Account from another Server" tool in WHM to not work so well, and break often, so I have used this method.

    Requirements:
    -cPanel on both servers
    -WHM access on the new server (one that the accounts are being moved to)
    -root access on the new server

    Throughout the instructions I will refer to the server your are transfering the accounts from as the "old server", and the server to are transfering the accounts to as the "new server".


    Instructions:
    1. Log into WHM of your new server and create a new account called "restore", or anything you like for that matter. Remember the FTP address, username ('restore', in this example), and account password. We will need these for later.


    2. Log into the cPanel account you are wanting to transfer on the old server.


    3. Click on "Backup >> Generate/Download a Full Backup".


    4. Once here, select the backup destination to be "Remote FTP Server".


    5. Enter your email address for verification, follwed by all of the FTP account information for "restore", which we created on the new server.

    -Remote Server: new server's address
    -Remote User: restore
    -Remote Password: restore's password
    -Port: 21

    Then, click "Generate Backup". This may take some time to backup the files, depending on how large the account is. You should receive an email provided in the above info once it is complete.


    6. Now, log into SSH on your new server.


    7. Type in the following commands:

    cd /home/restore/public_html

    ls

    After running the list command above (ls), you should see the tar file of the account on the old server. This means that you have successfully sent the file via FTP to your new server.


    8. Now move the tar file to your new server's /home directory with the following command:

    mv tar_file_name /home


    9. Now, log into WHM on your new server and navigate to "Backup >> Restore a Full Backup/cpmove file"

    Once here, you should see the old account's username under "Possible cpmove archives found:".

    If you do not, log back into SSH and be sure that the account's tar file has been moved into /home.


    10. Type in the account name in the text field in WHM, which is proceeded by "Enter the username for the account you wish to restore:".


    11. Click "Restore".


    12. Repeate process for additional accounts.



    That's all there is to it! I have found this way to work alot more sufficiently for moving accounts from one server to another. Hope you all enjoyed!
    k-planethost
    shared hosting,reseller vps at http://k-planet.gr

  9. #9
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by k-planethost View Post
    i had found an article at the past i use it some times i paste it
    This is not a good solution for me as the account I am importing as hundreds of parked domains which will take ages for me to restore manually.

  10. #10
    Join Date
    Apr 2009
    Location
    Athens,Greece
    Posts
    105
    web root protection is enabled on the server?
    why dont you try copy and account with password ? ask the guy for his pass or change it from root and inform him
    also there are suggestions here
    http://forums.cpanel.net/f5/how-tran...her-60637.html
    add the ips of the server on trusted network just in case that brut blocks the attend
    k-planethost
    shared hosting,reseller vps at http://k-planet.gr

  11. #11
    You should use WHM of server B to pull the data from Server A. Also flush the firewall on both and ensure SSH is running on the correct port at Server A.
    Windows VPS | Linux Hybrid Server | 99.9% Uptime
    http://www.odishahosting.com ( USA DC)
    http://www.odishahosting.in ( INDIA DC)

  12. #12
    Join Date
    Mar 2007
    Posts
    239
    How do I check if web root protection is enabled?

  13. #13
    This issue generally occurs when the firewall is blocking the access. In order to clarify, do the following

    1. ssh from server A to server B via console
    2. Check if sshd entry is present in the '/etc/hosts.deny' file of server B

  14. #14
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by bluenile View Post
    This issue generally occurs when the firewall is blocking the access. In order to clarify, do the following

    1. ssh from server A to server B via console
    2. Check if sshd entry is present in the '/etc/hosts.deny' file of server B
    There are no IP's in the hosts.deny file. I also tried to SSH from server A to server B and get the following error:

    [email protected] [~]# ssh [email protected].121.98
    ssh: connect to host xx.xx.121.98 port 22: Connection refused

  15. #15
    If you are using a different ssh port, say 1213, then you need to ssh as follows.

    [email protected] [~]# ssh [email protected].121.98 -p 1213

    It seems that you have firewall in the server B. I need the following results to further comment:

    1. iptables -n -L | grep 1213
    Assuming ssh port is 1213

    2. cat /etc/apf/VERSION
    Just to verify if APF firewall is installed.

    3. csf -v
    To check if CSF firewall is installed.

    If the firewall is blocking the access you can either stop the firewall temporarily or add firewall rule to allow server A to the ssh port.

    To stop firewall:

    $service iptables stop
    $csf -x
    /etc/init.d/apf stop

    Firewall rule to allow server A:
    Add following rules to your iptables

    iptables -A INPUT -p tcp -s ServerA_IP --dport 1213 -j ACCEPT
    iptables -A OUTPUT -p tcp --sport 1213 -j ACCEPT


    Replace ServerA_IP with the IP address of the server A.
    First rule will accept incoming (INPUT) tcp connection on port 1213 (ssh server) and second rule will send response of incoming ssh server to client (OUTPUT) from our ssh server source port 1213.

    Then try to ssh again. This time you will be able to ssh successfully.

  16. #16
    Join Date
    Mar 2007
    Posts
    239
    Quote Originally Posted by bluenile View Post
    If you are using a different ssh port, say 1213, then you need to ssh as follows.

    [email protected] [~]# ssh [email protected].121.98 -p 1213

    It seems that you have firewall in the server B. I need the following results to further comment:

    1. iptables -n -L | grep 1213
    Assuming ssh port is 1213

    2. cat /etc/apf/VERSION
    Just to verify if APF firewall is installed.

    3. csf -v
    To check if CSF firewall is installed.

    If the firewall is blocking the access you can either stop the firewall temporarily or add firewall rule to allow server A to the ssh port.

    To stop firewall:

    $service iptables stop
    $csf -x
    /etc/init.d/apf stop

    Firewall rule to allow server A:
    Add following rules to your iptables

    iptables -A INPUT -p tcp -s ServerA_IP --dport 1213 -j ACCEPT
    iptables -A OUTPUT -p tcp --sport 1213 -j ACCEPT


    Replace ServerA_IP with the IP address of the server A.
    First rule will accept incoming (INPUT) tcp connection on port 1213 (ssh server) and second rule will send response of incoming ssh server to client (OUTPUT) from our ssh server source port 1213.

    Then try to ssh again. This time you will be able to ssh successfully.


    Ah haa!! I think we may have found the problem. When trying to SSH to server B from server A I get the following error:

    The authenticity of host 'xx.xx.121.98 (xx.xx.121.98)' can't be established.
    RSA key fingerprint is 01:35:68:a5:73:2a:28:ee:1d:e1:08:a1:5a:a8:0a:35.
    Are you sure you want to continue connecting (yes/no)?

    I guess this is causing the problem in WHM?

  17. #17
    Join Date
    Mar 2007
    Posts
    239
    hmmm not sure if this is the problem, but anyway, results of the above tests you posted are as follows:

    1) No result for IP tables.
    2) APF is not installed.
    3) CSF is disabled.

    Let me know if you need anything else...

  18. #18
    Join Date
    Mar 2007
    Posts
    239
    Still looking for a resolution to this problem...

  19. #19
    Join Date
    Apr 2009
    Location
    Athens,Greece
    Posts
    105
    mate i dont know why why you didnt try to ftp by remote server as we said above the clients account to the new server.its working properly in this way
    Even if he has a thousand subdomains the account should be transferred properly(hopefully)
    Which client are you using for ssh ?
    try another client in case thats an issue from it as an example me i cannot get connected with pytty i do the job with poderosa
    k-planethost
    shared hosting,reseller vps at http://k-planet.gr

  20. #20
    Join Date
    Jul 2009
    Location
    India
    Posts
    42
    Try to flush firewall rules on both the servers. and make sure you are using the same port through which SSH of destination server is listening.

  21. #21
    Find the ssh port of the server B.
    Code:
    $grep Port /etc/ssh/sshd_config
    Specify this ssh port in WHM for account migration.

    You may try stopping the firewalls in both the servers.
    Code:
    $service iptables stop

Similar Threads

  1. Connecting to remote MySQL Database with CPanel
    By Mr Tech in forum Programming Discussion
    Replies: 9
    Last Post: 12-18-2008, 07:57 AM
  2. Replies: 13
    Last Post: 03-28-2007, 12:50 PM
  3. mysql not connecting on cPanel server
    By Devil Inside in forum Hosting Security and Technology
    Replies: 3
    Last Post: 10-09-2005, 11:05 AM
  4. deny ips in iptables connecting using ssh after 3 failed attempts
    By shell-box in forum Hosting Security and Technology
    Replies: 3
    Last Post: 10-01-2004, 06:20 PM
  5. Connecting to a CPanel/RH server via ETRN
    By Tron Of Borg in forum Hosting Security and Technology
    Replies: 0
    Last Post: 01-17-2003, 11:08 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •