How do I copy files from one domain name to another using the shell?

This page is showing a generic answer.
To see a more detailed answer customized for you, type your domain name here:

If you have multiple domain names hosted with us, we assign each domain name a different Unix user ID to prevent cross-site contamination.

However, occasionally customers who use the command-line shell need to copy files between those domain names using rsync or other SSH tools.

While you can simply type the password on the shell command line, you can also use SSH keys to avoid that.

To do this, create a key on the “source” domain name you’ll be connecting from by typing ssh-keygen -t rsa and saving it without a password, like this:

$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ex/
Created directory '/home/ex/'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/ex/
Your public key has been saved in /home/ex/

Then copy the contents of the new “” key to the “destination” server. An easy and safe method is to use the “ssh-copy-id” command:


After doing this, you should be able to connect from the source domain name to the destination domain name without a password, using:


Commands that use SSH as the underlying protocol, such as “rsync” and “scp”, should also work, such as:

rsync -av directory

scp file