Operating System - HP-UX
1771362 Members
1896 Online
109005 Solutions
New Discussion

Unable to sftp through proxy server

 
jmoor408
Senior Member

Unable to sftp through proxy server

I am trying to connect to an sftp server through an http proxy server.  When I attempt to connect from my HP-UX 11.31 server the connection appears to hang after connecting to the proxy.  I verifie that I was able to connect and transmit files from a RHEL server (details below.)

For sake of examples I am using the following:

The external ftp server is sftp.ext.com

The external ftp user is ftpusr

The local user is locusr

The gateway is gateway.cmp.com

The gateway port is 123

I am running HP-UX 11.31

I am able to connect from a RHEL server using the following command:

sftp -v -o ProxyCommand='nc --proxy-type http --proxy sftp.ext.com :123 %h %p' ftpusr@sftp.ext.com 22

 

I am running HP-UX and I have installed nc v1.10 from http://hpux.connect.org.uk/.

This version of nc does not have  the same functionality as in linux.  So the command fails with more

/opt/ssh/etc/ssh_config

Has the following  uncommented:

HashKnownHosts yes

HPNDisabled yes

The /home/locusr/.ssh/config is empty

From the HP-UX server when i run: ssh -vv -p 83 gateway.cmp.com

I get the following results:

 

OpenSSH_8.1p1+sftpfilecontrol-v1.3-hpn14v20, OpenSSL 1.1.1d  10 Sep 2019

debug1: Reading configuration data /home/locusr/.ssh/config

debug1: Reading configuration data /opt/ssh/etc/ssh_config

debug2: resolving "gateway.cmp.com" port 83

debug2: ssh_connect_direct

debug1: Connecting to gateway.cmp.com [19.136.136.136] port 83.

debug1: Connection established.

debug1: identity file /home/locusr/.ssh/id_rsa type 0

debug1: identity file /home/locusr/.ssh/id_rsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_dsa type -1

debug1: identity file /home/locusr/.ssh/id_dsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ed25519 type -1

debug1: identity file /home/locusr/.ssh/id_ed25519-cert type -1

debug1: identity file /home/locusr/.ssh/id_xmss type -1

debug1: identity file /home/locusr/.ssh/id_xmss-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_8.1

 

At this point  there is no response the system appears to freeze and I can only get out by using ctrl + c

 

When I run:

sftp -vv -o "proxyjump gateway.cmp.com :83" ftpusr@sftp.ext.com

I get the following logs:

OpenSSH_8.1p1+sftpfilecontrol-v1.3-hpn14v20, OpenSSL 1.1.1d  10 Sep 2019

debug1: Reading configuration data /home/locusr/.ssh/config

debug1: Reading configuration data /opt/ssh/etc/ssh_config

debug1: Setting implicit ProxyCommand from ProxyJump: /opt/ssh/bin/ssh -p 83 -vv -W '[%h]:%p' gateway.cmp.com

debug1: Executing proxy command: exec /opt/ssh/bin/ssh -p 83 -vv -W '[sftp.ext.com]:22' gateway.cmp.com

debug1: identity file /home/locusr/.ssh/id_rsa type 0

debug1: identity file /home/locusr/.ssh/id_rsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_dsa type -1

debug1: identity file /home/locusr/.ssh/id_dsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ed25519 type -1

debug1: identity file /home/locusr/.ssh/id_ed25519-cert type -1

debug1: identity file /home/locusr/.ssh/id_xmss type -1

debug1: identity file /home/locusr/.ssh/id_xmss-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_8.1

OpenSSH_8.1p1+sftpfilecontrol-v1.3-hpn14v20, OpenSSL 1.1.1d  10 Sep 2019

debug1: Reading configuration data /home/locusr/.ssh/config

debug1: Reading configuration data /opt/ssh/etc/ssh_config

debug2: resolving "gateway.cmp.com " port 83

debug2: ssh_connect_direct

debug1: Connecting to gateway.cmp.com  [19.136.136.136] port 123.

debug1: Connection established.

debug1: identity file /home/locusr/.ssh/id_rsa type 0

debug1: identity file /home/locusr/.ssh/id_rsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_dsa type -1

debug1: identity file /home/locusr/.ssh/id_dsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa type -1

debug1: identity file /home/locusr/.ssh/id_ecdsa-cert type -1

debug1: identity file /home/locusr/.ssh/id_ed25519 type -1

debug1: identity file /home/locusr/.ssh/id_ed25519-cert type -1

debug1: identity file /home/locusr/.ssh/id_xmss type -1

debug1: identity file /home/locusr/.ssh/id_xmss-cert type -1

debug1: Local version string SSH-2.0-OpenSSH_8.1

 The connection hangs at this point.