mac 下连接 linux 一般只需要 输入 ssh 用户名@ip地址 即可。
因为我重装了系统,然后就报了下面的问题
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ 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 RSA key sent by the remote host is
SHA256:umhwOOOtcz2P6sNppUC2kz0rTluDfynGhVKIkwQwnT8.
Please contact your system administrator.
Add correct host key in /Users/liuyanzhao/.ssh/known_hosts to get rid of this message.
Offending ECDSA key in /Users/liuyanzhao/.ssh/known_hosts:4
RSA host key for 101.112.11.111 has changed and you have requested strict checking.
Host key verification failed.
解决办法如下 :
// 执行该命令删除known_hosts文件
rm -rf ~/.ssh/known_hosts
删除后,直接登录会出现让你是否确定登录,输入一下yes就好了,然后就能直接输入密码登录了,详情可以看下图