I need to connect to an Ubuntu SSH Host (12.34.56.78 on a different Port = 443) via a corporate proxy from my Win10 machine. This has to be done via commandline, so I can use VS Code Insiders "Remove SSH" function.
I created a ssh-key on the win10-client and added the pub-key to the authorized_keys, but it is not working:
PS C:\> ssh linuxuser@12.34.56.78 -p443 -o "ProxyCommand ssh.exe -p443 -X connect -x http://corporate-proxy:8080 %h %p" -v -o "IdentityFile C:\Users\win10user\.ssh\id_rsa"
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
debug1: Reading configuration data C:\\Users\\win10user/.ssh/config
debug1: C:\\Users\\win10user/.ssh/config line 1: Applying options for 12.34.56.78
debug1: Executing proxy command: exec ssh.exe -p443 -X connect -x http://corporate-proxy:8080 12.34.56.78 443
debug1: identity file C:\\Users\\win10user\\.ssh\\id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file C:\\Users\\win10user\\.ssh\\id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.6
ssh_exchange_identification: Connection closed by remote host
ssh_exchange_identification: Connection closed by remote host
What am I missing?
Edit: The set path/folder has the files:
I also generated the id_rsa-cert via openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa-cert
PS M:\> ls C:\\Users\\win10user\\.ssh\
Directory: C:\Users\win10user\.ssh
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 10/29/2019 10:18 AM 167 config
-a---- 10/29/2019 10:07 AM 1766 id_rsa
-a---- 10/29/2019 10:07 AM 415 id_rsa.pub
-a---- 10/29/2019 11:02 AM 1675 id_rsa-cert
I found the solution:
ProxyCommand C:\Users\win10suer\Nmap\ncat.exe --proxy proxy:8080 %h %p