Secure SSH, CVS, SCP Without Password Prompt

  1. Suppose the domain name of your server is server, and your login name loginname.
  2. On the client, generate a public and private key.
     ssh-keygen -C loginname@server -t dsa 
    When asked for a password, simply press return. The private key is stored in

    and the public key in
  3. Copy the public file to the server with
     scp ~/.ssh/id_dsa.pub loginname@server:~/
  4. Login on the server with
     ssh loginname@server
  5. Append the copied file to ~/.ssh/authorized_keys with
     cat ~/id_dsa.pub >>~/.ssh/authorized_keys

▼ Click here to say thanks ▼

1 comment :

  1. Thank you for the explanation! I looked for this information hours and I tried to do a lot of things but nothing worked. On your blog I can always find what I need. Thank you so much !