표준 설정이 있습니다.
클라이언트(Windows 2019) --> HTTP 프록시 --> SSH 서버(Ubuntu) --> 서버
로컬 포트를 서버로 포트 포워딩하고 싶습니다.
이 설정을 사용하여 클라이언트에서 서버에 성공적으로 연결할 수 있습니다. 통화 시 프록시와 관련된 어떤 것도 지정하지 않았습니다.
ssh -v -p 22 -N -C -L 50000:WinServer:8080 user@SSHServer
이는 OpenSSH 구현이 클라이언트 시스템에서 기본 프록시 설정을 선택한다는 의미라고 생각합니다. 클라이언트 시스템 설정에서 내 솔루션을 분리할 수 있도록 프록시를 명시적으로 지정하고 싶습니다.
다음과 같이 ProxyCommand 옵션을 시도했습니다.
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
내 제약:
- 프록시에서는 아무것도 변경할 수 없습니다. 실제로 내 솔루션은 다양한 고객에게 배포되므로 HTTP 프록시 이외의 다른 것을 가정해서는 안 됩니다.
- 클라이언트에 소프트웨어를 추가/변경하는 기능이 제한되어 있습니다. 가능하다면 기본 Microsoft 기능을 사용하고 싶습니다. 모든 타사 소프트웨어는 인증을 받아야 하며 이는 매우 힘든 일입니다.
어떤 지침이라도 대단히 감사하겠습니다.
감사해요,