报错消息
Unable to negotiate with xx.xx.xx.xx port 22: no matching host key type found. Their offer: ssh-rsa
解决方案
临时策略
不区分Linux/Windows
ssh root@xx.xx.xx.xx -oHostKeyAlgorithms=+ssh-rsa
scp -o HostKeyAlgorithms=+ssh-rsa root@xx.xx.xx.xx:/tmp/file
长期策略
Windows修改 C:\Users<用户名>.ssh\config,如果没有自行创建
注意自己创建的时候,注意不要有类似.txt扩展名
Linux端修改~/.ssh/config
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
这里*可以换成指定服务器
其他方案
升级openssh环境
其他问题 scp报找不到sftp-server
scp root@172.168.1.10:/tmp/xxx .
sh: /usr/libexec/sftp-server: No such file or directory
解决方案 加上-O
scp -O root@172.168.1.10:/tmp/xxx .