OpenSSH para Windows sobre proxy HTTP

OpenSSH para Windows sobre proxy HTTP

Eu tenho uma configuração padrão:

Cliente (Windows 2019) -> Proxy HTTP -> Servidor SSH (Ubuntu) -> Servidor

Quero encaminhar minha porta local para o servidor.

Consigo me conectar com sucesso do cliente, usando esta configuração para o servidor. Não especifiquei nada relacionado ao proxy na minha chamada

ssh -v -p 22 -N -C -L 50000:WinServer:8080 user@SSHServer

Acho que isso significa que a implementação do OpenSSH está selecionando a configuração de proxy padrão do sistema cliente. Quero especificar explicitamente o proxy para poder isolar minha solução da configuração da máquina cliente.

Tentei a opção ProxyCommand da seguinte maneira:

PS C:\scripts> ssh.exe -vvv -C -L 50000:WinServer:8080 -o ProxyCommand="ssh.exe -v -W %h:%p -p proxy-port proxy-host" user@SSHServer

OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug3: Failed to open file:C:/Users/Administrator/.ssh/config error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug1: Executing proxy command: exec ssh.exe -v -W SSHServer:22 -p proxy-port proxy-host
debug3: spawning "C:\\Windows\\System32\\OpenSSH\\ssh.exe" -v -W SSHServer:22 -p proxy-port proxy-host
debug3: w32_getpeername ERROR: not sock :2
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5  

debug3: Failed to open file:C:/Users/Administrator/.ssh/id_rsa error:2
debug1: Connecting to proxy-host [proxy-host] port proxy-port.
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_rsa.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_rsa-cert error:2
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_rsa-cert.pub error:2  

debug1: Connection established.  

debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\Administrator/.ssh/id_rsa type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_dsa error:2
debug1: key_load_public: No such file or directory
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_dsa.pub error:2
debug1: identity file C:\\Users\\Administrator/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\Administrator/.ssh/id_dsa type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_dsa-cert error:2
debug1: key_load_public: No such file or directory
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_dsa-cert.pub error:2
debug1: identity file C:\\Users\\Administrator/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\Administrator/.ssh/id_ecdsa type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ecdsa error:2
debug1: key_load_public: No such file or directory
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ecdsa.pub error:2
debug1: identity file C:\\Users\\Administrator/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\Administrator/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ecdsa-cert error:2
debug1: key_load_public: No such file or directory
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ecdsa-cert.pub error:2
debug1: identity file C:\\Users\\Administrator/.ssh/id_ed25519-cert type -1
debug1: key_load_public: No such file or directory
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Administrator/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ed25519 error:2
debug1: key_load_public: No such file or directory
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ed25519.pub error:2
debug1: identity file C:\\Users\\Administrator/.ssh/id_xmss-cert type -1
debug1: key_load_public: No such file or directory
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7
debug1: identity file C:\\Users\\Administrator/.ssh/id_ed25519 type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ed25519-cert error:2
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_ed25519-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_ed25519-cert type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_xmss error:2
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_xmss.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_xmss type -1
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_xmss-cert error:2
debug3: Failed to open file:C:/Users/Administrator/.ssh/id_xmss-cert.pub error:2
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\Administrator/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.7  

ssh_exchange_identification: Connection closed by remote host

Minhas restrições:

  1. Não consigo alterar nada no proxy. Na verdade, minha solução será implantada em vários clientes, portanto não devo assumir nada além de um proxy HTTP.
  2. Tenho capacidade limitada para adicionar/alterar software no cliente. Gostaria de usar o recurso padrão da Microsoft, se possível. Qualquer software de terceiros precisaria ser qualificado, e isso é uma dor.

Qualquer orientação seria muito apreciada.

Obrigado,

informação relacionada