ssh_without_a_password_using_public_private_keys
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ssh_without_a_password_using_public_private_keys [2008/01/30 21:25] – juckins | ssh_without_a_password_using_public_private_keys [2025/06/08 14:51] (current) – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ======SSH / rysnc without password====== | + | ==== SSH / rysnc without password ==== |
- | make sure the same versions of ssh are on both machines (open version 3.1+ works best for HP-UX boxes) \\ | + | |
- | need to configure client (machine connecting from) and server (machine connecting to) \\ | + | |
- | on client: | + | |
- | cd to ~/.ssh \\ | + | |
- | ssh-keygen -t rsa -f ~/ | + | |
- | ssh-keygen -t dsa -f ~/ | + | |
- | this creates id_dsa, id_dsa.pub, id_rsa, id_rsa.pub - optionally can enter a ' | + | |
- | on server: \\ | + | Make sure the same versions of ssh are on both machines. \\ |
- | cd ~/.ssh/ \\ | + | You need to configure both client (machine connecting from) and server |
- | create authorized_keys files | + | On client, create ecdsa public and private keys (optionally you can also create rsa and dsa versions) with the following: \\ |
- | copy the id_dsa.pub and id_rsa.pub from client into authorized_keys file \\ | + | < |
- | make sure permissions | + | cd ~/.ssh |
+ | ssh-keygen -t ecdsa -f ~/.ssh/ | ||
+ | ssh-keygen -t rsa -f ~/ | ||
+ | ssh-keygen -t dsa -f ~/ | ||
+ | </ | ||
+ | This creates id_ecdsa, id_ecdsa.pub, | ||
+ | |||
+ | From the client, | ||
+ | |||
+ | ssh-copy-id username@remote_host | ||
+ | |||
+ | Follow the prompts. | ||
+ | |||
+ | To do this process manually on the server: \\ | ||
+ | < | ||
+ | cd ~/.ssh/ | ||
+ | </ | ||
+ | vi authorized_keys \\ | ||
+ | Copy the id_dsa.pub and id_rsa.pub from client into authorized_keys file \\ | ||
+ | Make sure permissions | ||
+ | Also: | ||
+ | < | ||
+ | chmod 0700 / | ||
+ | </ | ||
Repeat process for creating keys on server, and copy the .pub keys to the client' | Repeat process for creating keys on server, and copy the .pub keys to the client' | ||
Line 19: | Line 35: | ||
To restart sshd: kill running sshd process \\ | To restart sshd: kill running sshd process \\ | ||
- | issue the command | + | now issue: |
+ | < | ||
+ | </ | ||
- | Or for Red Hat systems: service sshd restart | + | Or for RedHat |
+ | < | ||
+ | service sshd restart | ||
+ | </ |
ssh_without_a_password_using_public_private_keys.1201746308.txt.gz · Last modified: by juckins