Add SSH Without Password
Client Side
- Generate your SSH encryption key pair for the filecopy account. Press the Enter key each time you are prompted for a password to be associated with the keys. (Do not enter a password.)
ssh-keygen -t dsa
- These keyfiles are stored in the.ssh subdirectory of your home directory. View the contents of that directory. The file named id_dsa is your private key, and id_dsa.pub is the public key that you will be sharing with your target server. Versions other than RedHat/Fedora may use different filenames, use the SSH man pages to verify this.
cd ~/.ssh/
- Copy the */only/* public key to the home directory of the account to which you will be sending the file.
scp id_dsa.pub root@hostname:/root/.ssh/
Server Side
- Log into the server that you will be connecting to via SSH/SCP.
- Goto the the following directory:
cd ~/.ssh/
- Once you are in the .ssh directory, type the following command:
cat id_dsa.pub >> authorized_keys
- Then type the following to delete the old client key:
rm -rf id_dsa.pub
- Done