Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试从Jenkins随机连接到Cygwin sshd无效(无法将标识字符串写入[clientIP]_Jenkins_Ssh_Tcp_Cygwin_Openssh - Fatal编程技术网

尝试从Jenkins随机连接到Cygwin sshd无效(无法将标识字符串写入[clientIP]

尝试从Jenkins随机连接到Cygwin sshd无效(无法将标识字符串写入[clientIP],jenkins,ssh,tcp,cygwin,openssh,Jenkins,Ssh,Tcp,Cygwin,Openssh,我正在尝试从Jenkins(docker容器)连接到运行Cygwin sshd的windows服务器(VM)。我面临的问题是(似乎)随机可以或无法连接。这是通过“SSH插件”(用户名/密码)和shell SSH命令(密钥对)实现的 Jenkins的调试信息告诉我: debug1: connect to address [serverIP] port 22: Connection refused debug1: fd 4 clearing O_NONBLOCK debug1: Forked ch

我正在尝试从Jenkins(docker容器)连接到运行Cygwin sshd的windows服务器(VM)。我面临的问题是(似乎)随机可以或无法连接。这是通过“SSH插件”(用户名/密码)和shell SSH命令(密钥对)实现的

Jenkins的调试信息告诉我:

debug1: connect to address [serverIP] port 22: Connection refused
debug1: fd 4 clearing O_NONBLOCK
debug1: Forked child 1128.
debug3: send_rexec_state: entering fd = 7 config len 232
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from [clientIP] port 59440 on 0.0.0.0 port 22
Could not write ident string to [clientIP] port 59440
当它不工作时,sshd日志告诉我:

debug1: connect to address [serverIP] port 22: Connection refused
debug1: fd 4 clearing O_NONBLOCK
debug1: Forked child 1128.
debug3: send_rexec_state: entering fd = 7 config len 232
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from [clientIP] port 59440 on 0.0.0.0 port 22
Could not write ident string to [clientIP] port 59440
当它工作时,我在sshd日志中得到以下信息:

debug1: fd 4 clearing O_NONBLOCK
debug1: Forked child 1708.
debug3: send_rexec_state: entering fd = 7 config len 232
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 4 out 4 newsock 4 pipe 6 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from [clientIP] port 56742 on [serverIP] port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.4
我看到的区别是0.0.0.0而不是serverIP,但我找不到原因

我试着设置一个每5分钟运行一次的作业,看看是否有模式,但我找不到

在服务器上我做了wireshark跟踪这些是我得到的包

Client to server: [SYN]
Client to server: [TCP Out-Of-Order] (same package as previous [SYN])
Server to client: [RST, ACK]
Client to server: [SYN, ACK]
Client to server: [TCP Retransmission] (same package as previous [SYN, ACK])
我对“无法将ident字符串写入[clientIP]”消息感到有点困惑,我很难找到更多关于为什么会发生这种情况的信息。 欢迎提供有关故障排除的任何帮助或有关显示此消息的原因的信息。

“连接被拒绝”通常意味着服务器不接受与您请求的IP地址和端口的连接。您尝试连接的服务可能没有侦听连接,或者可能正在侦听其他地址和/或端口

“连接被拒绝”也可能是由防火墙阻止连接造成的。在您的情况下,假定服务正在记录传入连接,但没有客户端IP地址,我猜您的服务器上运行某种防火墙或恶意软件检测软件,它正在干扰这些连接尝试

您需要访问此防火墙软件,找出它阻止这些连接的原因,并将其配置为停止干扰。

“连接被拒绝”通常意味着服务器不接受与您请求的IP地址和端口的连接。您尝试连接的服务可能没有侦听连接,或者可能正在侦听其他地址和/或端口

“连接被拒绝”也可能是由防火墙阻止连接造成的。在您的情况下,假定服务正在记录传入连接,但没有客户端IP地址,我猜您的服务器上运行某种防火墙或恶意软件检测软件,它正在干扰这些连接尝试

您需要访问此防火墙软件,找出它阻止这些连接的原因,并将其配置为停止干扰