tags:

views:

311

answers:

4

I have an embedded environment with a limited amount of storage available. I want to run an SFTP server in this environment and the Linux version I'm using does not contain one.

Does anyone know of a set of c-libraries for a Linux SFTP server that is lightweight? (ie. the binary is small in size, much less than 1MB)

NOTE: The libraries would need to be cross-compileable.

A: 

You could run ftpd wrapped in OpenSSH.

Nathan
FTP over ssh isn't really an option because of the added complexity in securing the data channel.
Scrubbie
A: 

OpenSSH contains an SFTP service. The server package comes to about half a megabyte here (compiled for i386, dynamically linked):

$ ls -sh /etc/ssh/sshd_config /usr/sbin/sshd /usr/libexec/openssh/sftp-server 
8.0K /etc/ssh/sshd_config              468K /usr/sbin/sshd
 64K /usr/libexec/openssh/sftp-server
Ignacio Vazquez-Abrams
+2  A: 

The dropbear SSH implementation is meant for embedded use, and might be of use for you.

Lars Wirzenius
Dropbear is almost certainly the best option here, assuming Scrubbie wants just an sftp server. If you want to integrate sftp into something else, ripping apart dropbear still might be one of your better options.
McPherrinM
A: 

You can try dropbear with Green End SFTP Server. http://matt.ucc.asn.au/dropbear/dropbear.html http://www.greenend.org.uk/rjk/sftpserver/