问题:no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 和 no matching host key type found. Their offer: ssh-rsa,ssh-dss
方法一
使用-o选项增加选项(man ssh查看)
ssh -o KexAlgorithms=+diffie-hellman-group-exchange-sha1 -o HostKeyAlgorithms=+ssh-rsa username@hostname
方法二
在~/.ssh目录的下的config文件(文件不存在自行创建)中添加如下代码:
Host *
KexAlgorithms +diffie-hellman-group-exchange-sha1
HostKeyAlgorithms +ssh-rsa