生成SSH key命令,通常秘钥注释选择是邮箱
ssh-keygen -t rsa -C "密钥的注释"
eg:
ssh-keygen -t rsa -C "baxiang"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/baxiang/.ssh/id_rsa):
默认会在相应路径下(/your_home_path)生成id_rsa
和id_rsa.pub
两个文件
ls -ll ~/.ssh
-rw------- 1 baxiang staff 2590 6 21 22:57 id_rsa
-rw-r--r-- 1 baxiang staff 561 6 21 22:57 id_rsa.pub
选择回车表示不设置密码
Created directory '/Users/baxiang/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/baxiang/.ssh/id_rsa.
Your public key has been saved in /Users/baxiang/.ssh/id_rsa.pub.
The key fingerprint is:
常见错误处理
ECDSA
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the ECDSA key sent by the remote host is
SHA256:nlPCw+4W51qbC2IwK1r7IFEda9cwENIw37G3yYIwrCs.
Please contact your system administrator.
Add correct host key in /Users/baxiang/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/baxiang/.ssh/known_hosts:8
ECDSA host key for 123.***.***.34 has changed and you have requested strict checking.
Host key verification failed.
ssh-keygen -R 123.***.***.34
ssh 工具
electerm
https://github.com/electerm/electerm
FinalShell
http://www.hostbuf.com/t/988.html
MobaXterm
https://mobaxterm.mobatek.net/download-home-edition.html
XShell
https://www.netsarang.com/zh/xshell/
termius
参考
https://www.codenong.com/p12008869/
https://www.v1tx.com/post/best-ssh-client/