Home > Back-end >  SFTP using SOCKS proxy command with password authentication
SFTP using SOCKS proxy command with password authentication

Time:10-19

We need to make sftp connection to download file through SOCKS proxy.

Trying below way but it's not working.

sftp -o ProxyCommand='/usr/bin/nc -v -xexamplesocksproxy.com:1080 %h %p' user@remote

We do have user name & password for SOCKS proxy authentication but not sure where to put it.

Any help would be appreciated.

CodePudding user response:

Imo, nc does not support authentication.

You will need to use another implementation. For example the ncat with its --proxy-auth switch.

According to Is there a built-in way to proxy SSH through socks5?, this should do:

sftp -o ProxyCommand='ncat --proxy-type socks5 --proxy-auth username:password examplesocksproxy.com:1080 %h %p' user@remote
  • Related