News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SFTP Support

Started by Fiery, October 13, 2012, 12:43:41 AM

Previous topic - Next topic

Fiery

Hello all,

We need SFTP support in SMF.  What would it take to get this implemented?

Thanks!
Brian

Arantor

A crap ton of work.

There IS an SFTP reference implementation that is thousands and thousands of lines of code (check out phpseclib), then look for any place where the code currently references an FTP connection, then write completely new code to reference SFTP. It's not even a simple one for one replacement because even if you created a wrapper for SFTP to silently pass through from FTP it actually wouldn't work properly because FTP provides virtual pathing (i.e. home directory appears to be /) while SFTP uses true pathing (/home/user/ really is /home/user/ and / really is /)

emanuele

In theory we could even take phpseclib and use it directly (since it's MIT licensed should be possible), but...is it really worth?
A mod would be much better in that case I think: if someone really need SFTP, he can grab the mod and use it (of course I know that this means someone has to write it and know how to write it...and that's for sure not me).


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor

Considering that you'd have to replace everywhere that uses the FTP library - and note that the FTP implementation expects different things that SFTP expects because of pathing, it's a *massive* amount of work.

* Arantor wasn't saying it out of awkwardness but out of experience of trying to do it.

emanuele

Yep, and that's something I don't even want to start thinking to do (but you know the world is full of crazy people! :P).

Though, reading again Fiery's message I think he was more interested in a kind of mod for his own forum rather than a feature...either way it's for sure a lot of work.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor

If you're doing it as a mod, the amount of change you might as well commit the changes after ;)

Arantor

But as indicated above this is a massive amount of work - and is vastly impractical to attempt to implement for 2.1. For 3.0 it should definitely be considered but that requires so much more change anyway, so moving this to closed for now.

Advertisement: