SFTP through Proxy

K

krishan001

Guest
Hi,

We are trying to sftp some files from our local server to remote server via a proxy server.

oracle@local_ip>sftp -v -oProxyCommand='/usr/bin/nc -v -x connect sftpduser01@proxy_ip:22 %h %p' sftpduser01@remote_ip 22

I am getting the following error :-

Connecting to remote_ip...
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Executing proxy command: exec /usr/bin/nc -v -x connect sftpduser01@proxy_ip:22 remote_ip 22
debug1: identity file /home/oracle/.ssh/id_rsa type 1
debug1: identity file /home/oracle/.ssh/id_dsa type -1
debug1: loaded 2 keys
nc: port range not valid
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer

The passwordless ssh is all configured from oracle@local_ip to sftpduser01@proxy_ip and from sftpduser01@proxy_ip to sftpduser01@remote_ip. Also we can SFTP from local to proxy and from proxy to remote.

Could someone please pinpoint what am i missing and what I need to do to successfully sftp from local server to remote server via a proxy server.

Thanks,
Krishan
 




Latest posts

Top