NOTE: you never want to copy a private key to remote servers, you want to add your key-pair's public key to the remote server so that your private key can be authenticated.
To bootstrap an account on aa remote server I generally use ssh-copy-id to do this.
$ ssh-copy-id Usage: /usr/bin/ssh-copy-id [-h|-?|-f|-n] [-i [identity_file]] [-p port] [[-o <ssh -o options>] ...] [user@]hostname -f: force mode -- copy keys without trying to check if they are already installed -n: dry run -- no keys are actually copied -h|-?: print this help
Usage
$ ssh-copy-id -i /path/to/id_rsa.pub <user>@<server>
Example
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected] /usr/local/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/user1/.ssh/id_rsa.pub" /usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/local/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: Number of key(s) added: 1 Now try logging into the machine, with: "ssh '[email protected]'" and check to make sure that only the key(s) you wanted were added.
NOTE: If you find you need to do this across multiple servers refer to my Q&A titled: How can I propagate my SSH pub key to a list of servers without having to type my password in over and over?.