ssh-keygen Cookie

gen 4096 bit RSA Key

1
ssh-keygen -b 4096

gen 256 bit ECDSA Key

1
ssh-keygen -t ed25519

args

-f 指定名字
-C 添加备注

copy id

1
ssh-copy-id -i ~/.ssh/my.pub -p 21 username@remote-server
args note
-i 指定证书文件,默认为~/.ssh/id_rsa.pub
-p 指定remote server ssh port
username@ 指定用户 默认为当前操作用户

手工

| dir | mod |
| ~/.ssh | 700 |
| id | 600 |
| id.pub | 600 |
| authorized_keys | 600 |