ubuntu虚拟可以与windows10相互ping通,但是SSH连接不上
解决方案一:
原帖:https://askubuntu.com/questions/1099573/server-responded-protocol-error-packet-too-long-1349676920
参考:I was able to login from putty but could not login from tectia client. Solution was edit /etc/ssh/sshd_config file and make PasswordAuthentication to Yes – BSAI Techno Sales Dec 12 '18 at 9:01
附(理论上是以下原因,也就是方案一参考里面提到的,修改密码验证为YES):
原因:
修改SSH配置文件时未配置PermitRootLogin参数
解决办法:
设置参数:PermitRootLogin yes
命令: sudo vim /etc/ssh/sshd_config
#取消注释, 修改默认端口号22为23
Port 23
#取消注释(可以不用)
ListenAddress 0.0.0.0
#取消注释,允许root账户登录
PermitRootLogin yes
#开启密码验证
PasswordAuthentication yes
#允许用户登录(可以不用)
UseLogin yes
UsePrivilegeSeparation no
#开启密码 登录
PasswordAuthentication yes选择登录账户(可以不用)
AllowUsers 登录账户
解决方案二:
原帖:https://www.linuxquestions.org/questions/linux-security-4/ssh-sftp-disconnection-152564/
参考:修改连接解密方式(SSH Secure File Transfer加密使用默认的,可以尝试DES,3DES