SFTP with hURL

Discuss about plugins that don't have a dedicated forum
Post Reply
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

SFTP with hURL

Post by jPV »

I'm trying to use SFTP with hURL under MorphOS, but I get an "Unsupported protocol!" error.

It seems that this protocol isn't enabled at all when listing the supported protocols with versioninfo. Is there a reason why it isn't enabled or should it be?

This code...

Code: Select all

@REQUIRE "hurl"
t=hurl.Versioninfo()
ForEach(t.protocols, DebugPrint)
...outputs this:

Code: Select all

tftp 1
ftp 1
imaps 1
ftps 1
smb 1
rtsp 1
dict 1
pop3 1
https 1
gopher 1
smbs 1
pop3s 1
imap 1
smtp 1
smtps 1
http 1
So no SFTP there... nor SCP for that matter either.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SFTP with hURL

Post by airsoftsoftwair »

Isn't it possible to use it through the ftps driver?
User avatar
jPV
Posts: 600
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: SFTP with hURL

Post by jPV »

No, SFTP and FTPS are for quite different purposes. The sites/servers I access to transfer files are pretty much 50% FTP(S) and 50% SFTP. Some of the FTP sites also support FTPS, but none of the SFTP servers I happen to use support FTP(S).

FTPS is just an extension to FTP protocol, but SFTP is its own protocol which works usually over SSH. So, servers I have access with SSH (shell accounts) can be accessed with SFTP and I can organize my own files in home directory etc. FTP(S) sites are usually more public and "sandboxed" , and the sites I use still allow access without encryption too.

SFTP is handy because you have that by default on any *nix box you have access or set up. It's also much more comfortable protocol, because all access goes through one port and you don't have to fight with data ports and firewalls as with FTP(S). I also have some own servers and media center boxes etc, and it's handy to access them with SFTP and I just won't bother wasting time to setup FTP(S) servers on them.

In any case, hURL documentation tells "hURL supports an incredibly wide range of transfer protocols, e.g. DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, Telnet and TFTP." and I didn't find any mentions that if some of these wouldn't be supported on some platforms. Maybe there's something else missing too, but SFTP would interest me atm ;)
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SFTP with hURL

Post by airsoftsoftwair »

Ok, so both SFTP and SCP require libssh2 which I currently haven't enabled for curl. I'll try to support that in the next version.
User avatar
airsoftsoftwair
Posts: 5425
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: SFTP with hURL

Post by airsoftsoftwair »

Code: Select all

- New: Added support for SFTP and SCP; although hURL 1.0 claimed those to be supported they didn't
  work because hURL was compiled without libssh2; hURL 1.1 contains libssh2 so SFTP and SCP will
  work as well
Post Reply