SecureCRT远程连接Ubuntu 20.04解决办法


安装net- tools

Ubuntu默认是没有安装网络命令的,我们安装?一下?。

sudo apt-get install net-tools

查看?22端口?是否?打开

?默认22端口是?没有打开的,我们?使用?这个?命令?看?一下?。

lsof -i:22

执行?上?面?命令?如果?没有?返回?端口?使用?信息?,则?主要?执行?下面?4条?命令?,安装?和?开启?22端口?。

sudo apt-get install openssh-server

sudo apt-get install ufw

sudo ufw enable

sudo ufw allow 22

老版本SecureCRT连接?Ubuntu20.04

老版本?SecureCRT通过ssh连接后会?报如下?错误?:

Key exchange failed.

No compatible key exchange method. The server supports these methods: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256

解决办法?如下?:

1)修改ssh_config

用vim命令打开ssh_config

sudo vim /etc/ssh/ssh_config

然后,按i键进入编辑模式,修改以下内容:

PasswordAuthentication yes

Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc

MACs hmac-md5,hmac-sha1,[email protected]

然后按ESC键退出编辑模式,再按:wq保存退出vim编辑器。

2)修改sshd_config

用vim命令打开ssh_config

sudo vim /etc/ssh/sshd_config

修改以下内容:

PermitRootLogin yes

PasswordAuthentication yes

并?加入下面的代码:

KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1

保存退出vim。

3)重启sshd服务

sudo service sshd restart

版权声明:

作者: freeclashnode

链接: https://www.freeclashnode.com/news/article-1129.htm

来源: FreeClashNode

文章版权归作者所有,未经允许请勿转载。

免费节点实时更新

热门文章

最新文章

归档