SFTP

Post Reply
juice
Posts: 11
Joined: Tue Sep 25, 2007 4:17 pm

SFTP

Post by juice » Wed Oct 03, 2007 5:49 pm

I apologize if it's already an option, but I couldn't find any tasks that would allow sending/retrieving files via SFTP.

User avatar
Alex
Site Admin
Posts: 341
Joined: Mon May 21, 2007 4:09 pm
Contact:

Re: SFTP

Post by Alex » Fri Oct 05, 2007 11:58 am

xStarter have not integrated future to direct connect to SSH servers and transfer files via SFTP protocol. But there exist a way to create SSH tunnel with external free software and send/retrieve files this way.

To create a SSH tunnel it is necessary that the remote host had a ssh service started besides ftp service. As a rule at Linux/Unix/BSD hosts both services work on default.

Using programs like PuTTY you can create SSH tunnel between your computer and server. Let's start PuTTY and create a new session: screen1.png in the attachment.

You should set remote host address and the port, ssh service is started on (22 on default).

Now you should set redirection of the port from your computer to the remote host port - port 3121 of the interface 127.0.0.1 will be redirected to the 21 port of the server. Please, look screen2.png in the attachment.

Let's clear up how it works. When you start the session PuTTY will establish connection to the server your_host by 22 port. After authorization (login and password entry) is performed and ssh connection to the server is established PuTTY will redirect all connections with 127.0.0.1:3121 to your_host:21 via secure ssh tunnel.

Now in xStarter you can set ftp server address - 127.0.0.1, port 3121.
When xStarter will connect to localhost - PuTTY will forward this connection through secure ssh tunnel to remote ftp server

As soon as xStarter connects to port 3121 of interface 127.0.0.1 PuTTY will redirect this connection via tunnel to your_host:21. Thus, it is possible to work with common ftp servers via secure ssh tunnel not being afraid that your data can be captured or changed by intruders.

Therefore, it is possible to establish connection via secure ssh tunnel not only to ftp server but also to POP3 and SMTP servers.
Attachments
screen2.png
screen2.png (10.44 KiB) Viewed 9421 times
screen1.png
screen1.png (11.2 KiB) Viewed 9423 times

dyoung
Posts: 1
Joined: Sun Dec 21, 2008 11:51 pm

Re: SFTP

Post by dyoung » Sun Dec 21, 2008 11:58 pm

I'm still struggling to get this to work. I keep getting Connection refused.
I don't know if I should use "www." in front of the host name or not, but I've tried using it and not using it and I still get "Connection refused."
Maybe I don't have PuTTY set up properly.
Question: on screen2.png, Source port says 3131, but just above it is L3121. I believe the 3131 is a typo and should be 3121. Is that correct?

User avatar
Alex
Site Admin
Posts: 341
Joined: Mon May 21, 2007 4:09 pm
Contact:

Re: SFTP

Post by Alex » Mon Dec 22, 2008 5:09 pm

Yes, 3131 is a type, correct value is 3121.
Do you have "Connection refused" then press Open button in the Putty or in another place?

User avatar
Alex
Site Admin
Posts: 341
Joined: Mon May 21, 2007 4:09 pm
Contact:

Re: SFTP

Post by Alex » Wed Jun 24, 2009 9:36 am

After some tests I was found this method with Putty don't works at all. So, new actions was added to support SFTP:
SFTPSyncUpload, SFTPSyncDownload, SFTPDownload and SFTPUpload.

This actions will be available in the final 1.9.3 and available right now in 1.9.3 beta:
viewtopic.php?f=5&t=199&start=0

Post Reply