Proxy Server and SFTP routing


 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications Proxy Server and SFTP routing
# 1  
Old 03-29-2013
Proxy Server and SFTP routing

Hi Friends,


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

the proxy server is windows.

I wanted to know is that is it possible?

I am using command to connect is

Code:
/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
# 2  
Old 03-29-2013
This User Gave Thanks to spacebar For This Post:
# 3  
Old 04-02-2013
Hi Spacebar,

Thanks for your quick reply!!!

I got the below command and ran

Code:
/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
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

# 5  
Old 04-03-2013
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 03:22 PM..
# 6  
Old 06-23-2013
Dear All, I apologize for putting my server 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.

Quote:
[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

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

Quote:
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.
# 7  
Old 06-25-2013
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

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

Server setup for multiple IP routing?

Hey there, I am a network administrator of a student dorm. Me and my team (we do this in our spare time) have the task to upgrade and rebuild our dorm intern network. But unfortunately we don't have that much experience with server setup and ip-routing and stuff. So here is the topic I want to... (8 Replies)
Discussion started by: mrgruen
8 Replies

2. Shell Programming and Scripting

Needed SFTP script from windows to UNIX server and from UNIX to windows server(reverse SFTP)

hi guys, i need a script to sftp the file from windows to unix server ....(before that i have to check whether the file exists in the windows server or not and again i have to reverse sftp the files from unix to windows server..... regards, Vasa Saikumar. (13 Replies)
Discussion started by: hemanthsaikumar
13 Replies

3. UNIX for Dummies Questions & Answers

enable all operations to use a proxy server , redhat server

Hi, i would like to enable all operations/connections to use a proxy server in a redhat server , witch file should i config to get this for all conections .... Thanks (0 Replies)
Discussion started by: prpkrk
0 Replies

4. AIX

AIX SFTP through MS ISA proxy

Dear all, I have some files to move to an SFTP server that someone else is providing on the public internet. The source for the file is on AIX, and although I have the sftp client installed, I'm stuck. The process would be automated (probably ksh script or perhaps as a C executable) so there... (2 Replies)
Discussion started by: rbatte1
2 Replies

5. UNIX for Advanced & Expert Users

Routing Emails, Sun One Messaging Server

Hello, i have Sun one Messaging Server 6.3 Up and running, i want to route emails that are destined to a certain email address, let's say test@mydomain.com through the tcp_local channel for example, to another email, and not allowing test@mydomain.com to receive them. So in short, i want... (0 Replies)
Discussion started by: lemonshare
0 Replies

6. Solaris

Connessione con client SFTP via Proxy

Ciao a tutti, ho l'esigenza di collegarmi in SFTP (client Winscp) ad una macchina solaris che vedo attraverso un'altra macchina solaris. Come configuro la connessione ? Sulla macchina diretta non ho problemi mentre sulla remota non so come configurare i parametri per utilizzare la diretta come... (1 Reply)
Discussion started by: bobbyred
1 Replies

7. IP Networking

Software/tool to route an IP packet to proxy server and capture the Proxy reply as an

Hi, I am involved in a project on Debian. One of my requirement is to route an IP packet in my application to a proxy server and receive the reply from the proxy server as an IP packet. My application handles data at the IP frame level. My application creates an IP packet(with all the necessary... (0 Replies)
Discussion started by: Rajesh_BK
0 Replies

8. Linux

how to get IP for proxy server

i have installed a proxy server on my linux box . how to get the IP for that proxy . cheers (3 Replies)
Discussion started by: ppass
3 Replies

9. UNIX for Dummies Questions & Answers

unix server behind MS proxy server

I'm trying to get a Unix server on the internet (mostly for DNS requests) but this server is on a network behind a Proxy server. How can I configure my unix server that he will pass the proxy server for internet requests? (2 Replies)
Discussion started by: RSlegers
2 Replies

10. IP Networking

routing through a proxy server

I'm new to this forum, so please be gentle ! I need to get my IBM RS running AIX4.3 onto the internet to a particular ftp server, through a NT server running proxy services. This NT server is directly connected to our internet router vis a secondary NIC on the NT server. When I add the route... (2 Replies)
Discussion started by: garry
2 Replies
Login or Register to Ask a Question