SFTP routing through PROXY Server | Unix Linux Forums | UNIX and Linux Applications

  Go Back    


UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

SFTP routing through PROXY Server

UNIX and Linux Applications


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-29-2013
mallayanala mallayanala is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 3 April 2013, 2:23 PM EDT
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
SFTP routing through PROXY Server

Hi Friends,


I am trying to connect to remote server via proxy server and transfer files from my server .

the proxy server is windows proxy server.

I wanted to know is that is it possible?

I am using command to connect is

/usr/local/bin/sftp -o "ProxyCommand nc proxyserver.com 8080"(E-Mail address blocked: See forum rules) 22

Could some one tell me whether above command is valid?

Could someone please share the command to connect to remote server via proxy?



Thanks,
Reddy
Sponsored Links
    #2  
Old 03-29-2013
spacebar's Avatar
spacebar spacebar is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 15 April 2014, 9:00 PM EDT
Location: spaceBAR Central
Posts: 434
Thanks: 0
Thanked 68 Times in 68 Posts
Check out the info on these links:
General :: How To Sftp Using A SOCKS V5 Proxy
how to sftp using a SOCKS v5 proxy
unix - How do I connect to a server behind an socks5 proxy through SSH on mac/linux? - Server Fault
https://kb.bluecoat.com/index?page=c...Q1397&actp=RSS
The Following User Says Thank You to spacebar For This Useful Post:
mallayanala (04-02-2013)
Sponsored Links
    #3  
Old 04-02-2013
mallayanala mallayanala is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 3 April 2013, 2:23 PM EDT
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Hi Spacebar,

Thanks for your quick reply!!!

I got the below command and ran

/usr/local/bin/sftp -oIdentityFile=/x0/xxxxx/yyyyy/.ssh/key_name -o "ProxyCommand nc proxy.server.com 8080 %h %p" user@remoteserver.com 22

When I run this command from server xyz via proxy server proxy.server.com to remote server remoteserver.com I am getting message

Connecting to remoteserver.com.... and prompt never comes back and no connection being made to remote server.

DO you think the command I am using is incorrect way?

Thanks,
Reddy
    #4  
Old 04-02-2013
spacebar's Avatar
spacebar spacebar is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 15 April 2014, 9:00 PM EDT
Location: spaceBAR Central
Posts: 434
Thanks: 0
Thanked 68 Times in 68 Posts
Try it like this, I've also added the "-v" switches so you should get more verbage of what is happening:

Code:
sftp -v -oIdentityFile=/x0/xxxxx/yyyyy/.ssh/key_name -oProxyCommand='/usr/bin/nc -v -xproxy.server.com:1080 %h %p' user@remote_sftp_server.com 22

Sponsored Links
    #5  
Old 04-03-2013
mallayanala mallayanala is offline
Registered User
 
Join Date: Mar 2013
Last Activity: 3 April 2013, 2:23 PM EDT
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Hi Spacebar

I ran below command


Code:
/usr/local/bin/sftp -v -oIdentityFile=/x0/xxxxx/yyyyy/.ssh/key_name -oProxyCommand="/usr/bin/nc -v proxy.server.com 8080 %h %p" user@remote_sftp_server.com 22

Connecting to remote_sftp_server.com...
OpenSSH_4.5p1, OpenSSL 0.9.8d 28 Sep 2006
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Executing proxy command: exec /usr/bin/nc -v proxy.server.com 8080 remote_sftp_server.com 22
debug1: permanently_drop_suid: 620026
debug1: identity file /x0/xxxxx/yyyyy/.ssh/key_name type -1
proxy.server.com [XXX.XX.XXX.XX] 8080 (?) open

Once again thanks alot for you help!!!

Last edited by Corona688; 04-03-2013 at 02:22 PM..
Sponsored Links
    #6  
Old 06-23-2013
abiisharma abiisharma is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 23 June 2013, 10:47 AM EDT
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Dear All, I apologize for putting my issue in existing thread, but my issue is same and bit urgent. I appreciate if you guys can help.

Hello Experts,

I need an urgent help. I have to make sftp connection to the remote server where I have to put and get files. Using "put" and "get".

But I am unable to login to sftp site on internet from my local server.

[root@test1 ~]# sftp -o "ProxyCommand /usr/bin/nc -X 10.105.54.134 8080 %h %p" User@files12.server.net
Connecting to files12.server.net...
nc: unsupported proxy protocol
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer

Please help

---------- Post updated at 09:47 AM ---------- Previous update was at 06:54 AM ----------

Little improvement,,..after giving docket address, the error changed

[root@test1 ~]# sftp -o "ProxyCommand /usr/bin/nc -X connect 10.105.54.134:8080 %h %p" User@files12.server.net 22

Connecting to files12.server.net...
nc: Proxy error: "HTTP/1.1 200 Connection established"
ssh_exchange_identification: Connection closed by remote host
Couldn't read packet: Connection reset by peer

Please suggest!!! It is really critical.
Sponsored Links
    #7  
Old 06-25-2013
spacebar's Avatar
spacebar spacebar is offline
Registered User
 
Join Date: Oct 2009
Last Activity: 15 April 2014, 9:00 PM EDT
Location: spaceBAR Central
Posts: 434
Thanks: 0
Thanked 68 Times in 68 Posts
Try it like this and post the additional messages logged:

Code:
sftp -v -oProxyCommand='/usr/bin/nc -v -x10.105.54.134:8080 %h %p' User@files12.server.net 22

Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
enable all operations to use a proxy server , redhat server prpkrk UNIX for Dummies Questions & Answers 0 08-20-2012 05:09 AM
AIX SFTP through MS ISA proxy rbatte1 AIX 2 10-29-2010 12:25 PM
Connessione con client SFTP via Proxy bobbyred Solaris 1 02-25-2010 07:30 AM
Software/tool to route an IP packet to proxy server and capture the Proxy reply as an Rajesh_BK IP Networking 0 02-19-2009 01:32 AM
routing through a proxy server garry IP Networking 2 01-30-2002 04:18 AM



All times are GMT -4. The time now is 05:12 PM.