Table of Contents
ChangeLog
Data | Desc |
---|---|
2016/5/26 | update compile on i.MX6Ul |
Download sources
1 2 3 4 5 |
$ git clone git://anongit.mindrot.org/openssh.git $ git clone git://git.openssl.org/openssl.git $ git clone https://github.com/madler/zlib.git |
Build openssl
如果编译器中自带了openssl库则不需要自己重新编译openssl。如果编译器不带openssl,或者自带的openssl有漏洞,则需要自己下载并编译openssl。
Build zlib (i.MX6Ul)
1 2 3 4 |
$ ./configure --host=arm-poky-linux-gnueabi $ make |
Build openssh
1 2 3 4 5 |
$ git checkout V_7_2 $ autoconf $ autoheader |
SAM9X5 (CROSS_COMPILE:arm-linux)
1 2 3 |
$ ./configure --host=arm-linux --with-ssl-dir=/data/utils/openssl.git $ make |
i.MX6UL (CROSS_COMPILE:arm-poky-linux-gnueabi)
1 2 3 4 5 6 |
$ ./configure --host=arm-linux --with-ssl-dir=../openssl.git \ --with-zlib=../zlib.git/ # modify Makefile, replace LD with CC $ make |
Deploy
1 2 3 4 5 6 7 |
$ cp ssh-keygen to TARGET /usr/sbin $ cp sshd to TARGET /usr/sbin $ cp sshd_config to TARGET /usr/local/etc/ $ ssh-keygen -A # /usr/sbin/sshd |