解决Windows10 ssh连接Linux服务器Unable to negotiate with xx.xx.xx.xx port xx: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1问题

Git安装

Git for windows:https://gitforwindows.org/
Windws10 安装Git后使用SSH连接Linux服务器时遇到问题:Unable to negotiate with xx.xx.xx.xx port xx: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1解决办法如下:

解决办法

在C盘“用户/当前用户名/.ssh/”文件下新建config文件,该文件无扩展名。然后使用写字板等打开,输入以下内容:

   Host xx.xx.xx.xx
        KexAlgorithms +diffie-hellman-group1-sha1

注意:xx.xx.xx.xx为服务器ip;+前面有一个空格!
此方法只支持当前用户连接Linux服务器,不支持其他用户登陆。

Windows10 使用SSH连接Linux服务器

找到Git安装目录,打开git-bash.exe,然后在命令行中输入

ssh username@xx.xx.xx.xx           //username为服务器用户名
然后根据提示输入:yes
username@xx.xx.xx.xx's password:   //输入密码

参考

CSDN博客:https://blog.csdn.net/fengbingchun/article/details/50170017?hmsr=toutiao.io&utm_medium=toutiao.io&utm_source=toutiao.io

Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐