2

I have a new server. The hosting gives me a ftp account for backing up the main server. My problem is, I can only connect to this ftp account from the server. I don't like surfing inside folders via putty. I am WinSCP to browse folders and editing files on my server via SSH. It has a good windows-like interface.. folders etc.

Can I connect to that remote ftp account on the server with WinSCP or a program that allows it? Basically it needs to connect to my server via SSH then connect to the ftp account from the main server.

Update ( @Phil explained better) You have a server (lets call it LiveServer) and your hosting provider has given you some FTP space on a different server (lets call it FTPServer) that you can use for backups.

You can only access FTPServer From LiveServer - after all, its just there to use for backups of that server

You want to know if there is a way of somehow getting access to the FTP server from your home PC by going via the LiveServer using SSH or something similar.

Caleb
  • 11,583
  • 4
  • 35
  • 49
Ünsal Korkmaz
  • 63
  • 3
  • 12
  • 1
    'Poor' English aside, I have no idea what you're trying to ask. You talk about WinSCP, a "real server", SSHing to some other computer, and an ftp account without ever specifying what is where or how it all relates to each other. – Chris S Apr 18 '11 at 14:26
  • @Chris S, think a ftp account that you can only connect from a linux server. There is no way to connect directly to this ftp account. And i want to connect to this ftp account from my windows7 using home computer. And i am looking for a program for it that have user interface. I can try to explain more if i still couldnt successfully explain. – Ünsal Korkmaz Apr 18 '11 at 14:35
  • Selam Ünsal ... do you have any admin rights on the inbetween SSH server box so that you could set it up as a VPN host or setup SSH port forwarding or anything like that? This is a solvable problem but if it's a highly restricted user account it might not be possible for you to pull off. In any even we need to know more about what you can and can't do on these boxes. Kolay gelsin. – Caleb Apr 18 '11 at 16:44
  • we found a solution for this with @DerfK more detailed info: http://winscp.net/eng/docs/guide_tunnel Thanks everyone for helping. – Ünsal Korkmaz Apr 19 '11 at 10:18

2 Answers2

1

Since standard FTP uses multiple (randomly selected) ports to communicate, you can't just tunnel one port like you could with most other protocols.

If you had control over the FTP server, you could configure it to force passive mode and use only a specific range of ports. It'd also have to lie about its address (or else your client would have to be configurable to ignore the address given by the server). Then you could set up putty to forward every port in that range to the FTP server.

Ask your host if there is any way you can scp files to the FTP server instead of using FTP. If so, you can set putty up to tunnel from Source Port insert whatever here to Destination ftpserveripaddress:22 (Done under Connection -> SSH -> Tunnels). Then in winscp, connect to localhost:sourceport

DerfK
  • 19,313
  • 2
  • 35
  • 51
  • thanks a lot for pointing tunnel.. more detailed info: http://winscp.net/eng/docs/guide_tunnel – Ünsal Korkmaz Apr 18 '11 at 22:06
  • I completely forgot about the SOCKS proxy option for putty, that makes it easy whether you control the remote server or not. – DerfK Apr 18 '11 at 22:24
0

I believe what you are asking is as follows

You have a server (lets call it LiveServer) and your hosting provider has given you some FTP space on a different server (lets call it FTPServer) that you can use for backups.

You can only access FTPServer From LiveServer - after all, its just there to use for backups of that server

You want to know if there is a way of somehow getting access to the FTP server from your home PC by going via the LiveServer using SSH or something similar.

The simple answer is no although if you had complete control over the LiveServer you could conceivably set it up as a VPN server so it accepts VPN connections from your home machine and then forwards packets on to the FTP server as necessary. However, it may be the case that your hosting provider would not allow such packets through its firewalls and its certainly not an easy thing to set up and get working as a novice

Caleb
  • 11,583
  • 4
  • 35
  • 49
Phil
  • 3,138
  • 1
  • 21
  • 27
  • Yes totally correct. This is what i am looking for. Let me ask: there is a way to connect this ftpserver from liveserver via SSH right? – Ünsal Korkmaz Apr 18 '11 at 15:15