mywiki:linux:ssh
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| mywiki:linux:ssh [2016/06/03 16:27] – created shaoguoh | mywiki:linux:ssh [2019/09/15 18:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | SSH Login Without Password Using ssh-keygen & ssh-copy-id | ||
| + | Suppose need to use ssh to login to remote PC B from local PC A | ||
| + | |||
| + | * Create public and private keys using ssh-key-gen at At PC A | ||
| + | **Take note: make sure use empty passphrase for auto login without password case** | ||
| + | < | ||
| + | ssh-keygen | ||
| + | Generating public/ | ||
| + | Enter file in which to save the key (/ | ||
| + | Enter passphrase (empty for no passphrase): | ||
| + | Enter same passphrase again: [Press enter key again] | ||
| + | Your identification has been saved in / | ||
| + | Your public key has been saved in / | ||
| + | The key fingerprint is: | ||
| + | 94: | ||
| + | </ | ||
| + | |||
| + | * Copy the public key from PC A to remote PC B using ssh-copy-id | ||
| + | < | ||
| + | ssh-copy-id -i ~/ | ||
| + | xxxx@remote-PC-B' | ||
| + | </ | ||
| + | |||
| + | * Login to remote PC B without password | ||
| + | < | ||
| + | ssh remote-PC-B | ||
| + | </ | ||
mywiki/linux/ssh.1464942475.txt.gz · Last modified: (external edit)
