Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:ssh_pub_priv_keys [2014/11/13 23:15] billdozor created |
linux_wiki:ssh_pub_priv_keys [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== SSH Pub/Priv Keys ====== | ====== SSH Pub/Priv Keys ====== | ||
- | Description: | + | **General Information** |
- | From the local client: | + | Create public/ |
- | 1) Create public/ | + | **Checklist** |
- | < | + | * Distro(s): Any |
+ | |||
+ | ---- | ||
+ | |||
+ | ===== From the local client ===== | ||
+ | |||
+ | ==== Create public/ | ||
+ | < | ||
ssh-keygen -t rsa | ssh-keygen -t rsa | ||
Enter file to save the key (Enter for default). | Enter file to save the key (Enter for default). | ||
Line 17: | Line 24: | ||
* $HOME/ | * $HOME/ | ||
- | 2) Put public key on remote server(s) | + | ==== Put public key on remote server(s) |
- | < | + | < |
ssh-copy-id -i $HOME/ | ssh-copy-id -i $HOME/ | ||
</ | </ | ||
- | | + | If ssh-copy-id is not installed, use scp instead |
- | < | + | < |
scp $HOME/ | scp $HOME/ | ||
ssh username@server | ssh username@server | ||
Line 30: | Line 37: | ||
</ | </ | ||
- | 3) Ensure ssh-agent is running and add private key passphrase | + | ==== Ensure ssh-agent is running and add private key passphrase |
- | < | + | < |
eval $(ssh-agent) | eval $(ssh-agent) | ||
ssh-add | ssh-add | ||
</ | </ | ||
- | a)Enter private key passphrase to add private key to the ssh-agent. | + | Enter private key passphrase to add private key to the ssh-agent. |
- | 4) Login to server, no password prompt because of ssh-agent/ | + | ==== Login to server, no password prompt because of ssh-agent/ |
- | < | + | < |
ssh username@server | ssh username@server | ||
</ | </ |