linux ssh报错Unable to negotiate with **** port 22: no matching host key type found

目录
  • linux ssh报错Unable to negotiate with **** port 22: no matching host key type found
    • ssh连接机器报错

linux ssh报错Unable to negotiate with **** port 22: no matching host key type found

ssh连接机器报错

今天使用mac通过ssh连接机器的时候报错如上,查阅网上资料后解决,方法如下

//进入终端
command+空格,输入终端后按回车进入命令行模式

//进入家目录
cd ~

//创建ssh目录,有的已经有了,则不需要创建
mkdir -p .ssh

//touch一个config文件并填入内容
touch config;vim config

Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa

保存后,测试可以ssh登录了,特此记录下解决方法

你可能感兴趣的:(linux,ssh,服务器,运维)