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
Proxy 我应该如何编写ssh代理命令?_Proxy_Ssh_Openssh - Fatal编程技术网

Proxy 我应该如何编写ssh代理命令?

Proxy 我应该如何编写ssh代理命令?,proxy,ssh,openssh,Proxy,Ssh,Openssh,我正在尝试编写一个与openssh的-oproxy命令兼容的实用程序。我编写了一个实用程序,它是ssh连接(或任何连接)的透明套接字。虽然进行了一些调试,但我相当确信它确实工作正常(手动IO测试、大型二进制文件传输都可以) OpenSSH无法使用它。我不知道为什么。我必须保证交付特定的块大小或类似的东西吗 以下是调试输出的示例试运行: cletus:Desktop jdizzle$ ssh -v -oProxyCommand='python ./tunnel_client.py 127.0.0.

我正在尝试编写一个与openssh的-oproxy命令兼容的实用程序。我编写了一个实用程序,它是ssh连接(或任何连接)的透明套接字。虽然进行了一些调试,但我相当确信它确实工作正常(手动IO测试、大型二进制文件传输都可以)

OpenSSH无法使用它。我不知道为什么。我必须保证交付特定的块大小或类似的东西吗

以下是调试输出的示例试运行:

cletus:Desktop jdizzle$ ssh -v -oProxyCommand='python ./tunnel_client.py 127.0.0.1 22 2>/dev/null' 127.0.0.1
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /path/jdizzle/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: auto-mux: Trying existing master
debug1: Executing proxy command: exec python ./tunnel_client.py 127.0.0.1 22 2>/dev/null
debug1: identity file /path/jdizzle/.ssh/identity type -1
debug1: identity file /path/jdizzle/.ssh/id_rsa type -1
debug1: identity file /path/jdizzle/.ssh/id_dsa type -1
debug1: permanently_drop_suid: 501
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1
debug1: match: OpenSSH_5.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
Received disconnect from UNKNOWN: 2: Bad packet length 1546673200.
cletus:Desktop jdizzle$ssh-v-oProxyCommand='python./tunnel_client.py 127.0.0.1 22>/dev/null'127.0.0.1
OpenSSH_5.2p1、OpenSSL 0.9.8l 2009年11月5日
debug1:正在读取配置数据/path/jdizzle/.ssh/config
debug1:读取配置数据/etc/ssh\u config
debug1:自动多路复用器:尝试现有主机
debug1:执行代理命令:exec python./tunnel_client.py 127.0.0.1 22>/dev/null
debug1:identity file/path/jdizzle/.ssh/identity-type-1
debug1:identity file/path/jdizzle/.ssh/id_rsa type-1
debug1:identity file/path/jdizzle/.ssh/id_dsa type-1
debug1:永久性\u丢弃\u suid:501
debug1:远程协议版本2.0,远程软件版本OpenSSH_5.1
debug1:match:OpenSSH_5.1 pat OpenSSH*
debug1:启用协议2.0的兼容模式
debug1:本地版本字符串SSH-2.0-OpenSSH_5.2
debug1:SSH2\u MSG\u KEXINIT已发送
debug1:SSH2\u MSG\u KEXINIT已收到
debug1:kex:server->client aes128 ctr hmac-md5无
debug1:kex:客户端->服务器aes128 ctr hmac-md5无

debug1:SSH2_MSG_KEX_DH_GEX_请求(1024证明我是PHP神奇引号的另一个受害者。流中的空字节在我背后被转换为“\0”!显然我的测试中没有一个包含空字节