ssh通过sock5的问题kex_exchange_identification: Connection closed by remote host

工作需要,连接几台外网的服务器.由于移动的网络直连,经常会连不上,所以想通过本地的sock5代理连接.

神奇的事情发送了,通过sock5代理,有几台主机可以连上,有几天报上面的错误.

经过反复测试,外网的服务器只要用默认的22端口,无法通过sock5连接,但国内的没问题.

不知道是不是国内的fhw问题,还是其它的问题.

 

最后是一个ms主机的修改ssh端口的报错:

参考解决方式:https://www.thegeekdiary.com/error-bind-to-port-2222-on-0-0-0-0-failed-permission-denied-error-while-starting-sshd-service-on-centos-rhel/

主要是ms主机内置的semanage进程的监控

# semanage port -l | grep ssh
ssh_port_t tcp 22

2. Configure SELinux to allow sshd to utilize additional port 2222.
semanage port -a -t ssh_port_t -p tcp 2222

3. Verify new SELinux permitted sshd listen ports.
# semanage port -l | grep ssh
ssh_port_t tcp 2222,22
posted @ 2022-09-05 20:51  就是想学习  阅读(2110)  评论(0编辑  收藏  举报