...
Code Block | ||
---|---|---|
| ||
Tin-Phams-iMac:~ tinpham$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/Users/tinpham/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/tinpham/.ssh/id_rsa. Your public key has been saved in /Users/tinpham/.ssh/id_rsa.pub. The key fingerprint is: c7:6c:3e:87:4a:09:90:ef:6d:a9:88:f8:f0:89:d2:13 tinpham@Tin-Phams-iMac.local The key's randomart image is: +--[ RSA 2048]----+ | . oo. | | s .. . | | ...++ .| | T . +.=...| | F o + *. | | + o + . | | C . | | . + | | | +-----------------+ Tin-Phams-iMac:~ tinpham$ |
On a Unix system file permissions should automatically be set to protect your key files from other accounts. If you are on a Windows machine, make sure to store your private key on a protected location. Usually this would be your Windows desktop or home directory.
Copy Public Key to Server
If you happen to using a Linux client there is a shortcut to copying the public key to the server,
...
Since I happen to be using Mac OS X I do this manually,
Code Block | ||
---|---|---|
| ||
ssh-copy-id username@remotehost | ||
scp ... |
Log into the server using your existing authentication method,
Disable Password Authentication
...
https://help.ubuntu.com/10.10/serverguide/C/openssh-server.html - Ubuntu version of docs.h