Not logged in


Lets say you want to copy between two hosts host_src and host_dest. host_src is the host where you would run the scp, ssh or rsyn command, irrespective of the direction of the file copy!
  1. On host_src, run this command as the user that runs scp/ssh/rsync
    $ ssh-keygen -t rsa
    This will prompt for a passphrase. Just press the enter key. It'll then generate an identification (private key) and a public key. Do not ever share the private key with anyone! ssh-keygen shows where it saved the public key. This is by default ~/.ssh/
    Your public key has been saved in /.ssh/
  2. Transfer the file to host_dest by either ftp, scp, rsync or any other method.
  3. On host_dest, login as the remote user which you plan to use when you run scp, ssh or rsync on host_src.
  4. Copy the contents of to ~/.ssh/authorized_keys
    $ cat >>~/.ssh/authorized_keys
    $ chmod 700 ~/.ssh/authorized_keys
    If this file does not exists, then the above command will create it. Make sure you remove permission for others to read this file. If its a public key, why prevent others from reading this file? Probably, the owner of the key has distributed it to a few trusted users and has not placed any additional security measures to check if its really a trusted user.
Content last modified 2013-11-14 21:31:49 Karate | Webmail | Could | Privat | Firma | Imkern | HW | Admin | Domains