This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
computing:linux:ssh_keys [2011/12/13 12:50] gcooper created |
computing:linux:ssh_keys [2017/01/28 12:33] (current) gcooper |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Set Up SSH Keys ====== | ====== Set Up SSH Keys ====== | ||
+ | |||
+ | ===== Common Use ===== | ||
Use this command to set up your SSH key on a remote server that you log into frequently: | Use this command to set up your SSH key on a remote server that you log into frequently: | ||
< | < | ||
- | ssh-copy-id | + | ssh-copy-id |
</ | </ | ||
- | Or if the '' | + | ===== Without ssh-copy-id ===== |
+ | |||
+ | If the '' | ||
< | < | ||
- | cat ~/ | + | cat ~/ |
</ | </ | ||
- | or if SSH is on a non-standard port: | + | ===== Non-Standard SSH Port ===== |
- | cat ~/ | + | If SSH is on a non-standard port: |
- | If no public key yet exists on the machine you will be using to make remote connections: | + | < |
+ | ssh-copy-id -p 2222 user@remote.host.name | ||
+ | </ | ||
+ | or: | ||
+ | < | ||
+ | cat ~/ | ||
+ | </ | ||
+ | |||
+ | ===== Generate Public Key ===== | ||
+ | |||
+ | If no public key yet exists on the machine you will be using to make remote connections, you'll need to create one. This is only done once: | ||
+ | |||
+ | < | ||
+ | ssh-keygen -t rsa | ||
+ | </ | ||
- | ssh-keygen -t dsa | + | You probably want to just hit enter at the passphrase prompt. |