开启ssh root登录 ubuntu20.04 server
编辑ssh的配置文件,命令:sudo vi /etc/ssh/sshd_config
在Authentication部分,注释掉“PermitRootLogin without-password”
在Authentication部分,添加“PermitRootLogin yes”
保存数据,重新启动ssh服务,命令:sudo service ssh restart
然后就可以使用root帐号登录ssh
ssh 报no matching key exchange:diffie-hellman-group1-sha1
可以在~/.ssh文件夹下新建config文件,内容如下
Host somehost.example.org
KexAlgorithms +diffie-hellman-group1-sha1