Proxy Details with SFTP command

In RHEL/CentOS 7 clients and Linux versions where the nc command doesn't recognize the -x and -X command-line arguments (e.g. Ncat: Version 7.50), the working command would be:

sftp  -o ConnectTimeout=3 -o ProxyCommand='/usr/bin/nc --proxy-type http --proxy proxy.ABCD.com:80 %h %p' -oPort=32 [email protected]

The problem is that the shell on the SFTP server cannot find the command connect. Two likely causes:

  1. Your $PATH is not set. Try replacing connect with /usr/bin/connect or $(which connect). Or login with SSH and locate this program.
  2. The SFTP server does not have connect installed. Contact the system administrator of the machine.

As Schot said I contacted the System Administrator & after installing the connect the command is:

sftp -o "ProxyCommand connect -H proxy.ABCD.com:80 %h %p" [email protected]

Tags:

Sftp