(First release)
(Updated to zlib 1.2.11 & OpenSSH 8.5)
 
Line 9: Line 9:
  
 
<PRE>
 
<PRE>
wget http://zlib.net/zlib-1.2.8.tar.gz
+
wget http://zlib.net/zlib-1.2.11.tar.gz
tar -xzf zlib-1.2.8.tar.gz
+
tar -xzf zlib-1.2.11.tar.gz
cd zlib-1.2.8/
+
cd zlib-1.2.11/
 
./configure --prefix=/home/export/rootfs
 
./configure --prefix=/home/export/rootfs
 
</PRE>
 
</PRE>
Line 37: Line 37:
  
 
<PRE>
 
<PRE>
wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-6.9p1.tar.gz
+
wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz
tar -xzf openssh-6.9p1.tar.gz
+
tar -xzf openssh-8.5p1.tar.gz
cd openssh-6.9p1
+
cd openssh-8.5p1
./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=/home/export/rootfs
+
./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=../zlib-1.2.11 --without-openssl
 
make sftp-server
 
make sftp-server
 
</PRE>
 
</PRE>
  
 
Now copy sftp-server to /usr/libexec/ on your target system.
 
Now copy sftp-server to /usr/libexec/ on your target system.

Latest revision as of 11:25, 3 April 2021

SFTP-Server

If you have installed the DropBear SSH Server and now need to transfer files using SFTP (Secure File Transfer Protocol), the SFTP-server as part of OpenSSH is a good choice.

zlib Data Compression Library

sftp-server requires zlib. Download, cross compile and install the zlib compression libraries. Configure doesn't accept the --host parameter (reports unknown option), so you need to hack the makefile.

wget http://zlib.net/zlib-1.2.11.tar.gz
tar -xzf zlib-1.2.11.tar.gz
cd zlib-1.2.11/
./configure --prefix=/home/export/rootfs

Edit the makefile and prefix the build tools with arm-none-linux-gnueabi-.

CC=arm-linux-gnueabi-gcc
LDSHARED=arm-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
CPP=arm-linux-gnueabi-gcc -E
AR=arm-linux-gnueabi-ar
RANLIB=arm-linux-gnueabi-ranlib

Make and install:

make
make install

OpenSSH sftp-server

Download and build the sftp-server component of OpenSSH:

wget http://mirror.internode.on.net/pub/OpenBSD/OpenSSH/portable/openssh-8.5p1.tar.gz
tar -xzf openssh-8.5p1.tar.gz
cd openssh-8.5p1
./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --with-zlib=../zlib-1.2.11 --without-openssl
make sftp-server

Now copy sftp-server to /usr/libexec/ on your target system.