1.下载源码包,地址如下:
    openssh http://www.openssh.com/portable.html
    openssl http://www.openssl.org/source
    zlib http://www.zlib.net/
    2.交叉编译
    创建工作目录:

    在/work目下面创建ssh目录
    mkdir ssh
    cd ssh
    mdkir compress
    mkdir install

    解压安装包:
    # cd /work/ssh/compressed/
    # tar zxvf zlib-1.2.11.tar.gz
    # tar zxvf openssl-0.9.8e.tar.gz
    # tar zxvf openssh-4.6p1.tar.gz

    交叉编译 zlib:
    # cd /work/ssh/compress zlib-1.2.11.tar.gz
    # ./configure —prefix=/work/ssh/install/zlib-1.2.11
    # vim Makefile
    CC=arm-none-linux-gnueabi-gcc
    AR=arm-none-linux-gnueabi-ar rc
    CPP =arm-none-linux-gnueabi-gcc -E
    LDSHARED=arm-none-linux-gnueabi-gcc
    # make
    # make install
    交叉编译openssl
    # cd /work/ssh/source/openssl-0.9.8e
    # ./Configure —prefix=/work/ssh/install/openssl-0.9.8e os/compiler:arm-none-linux-gnueabi-gcc
    # make
    # make install
    交叉编译openssh
    # cd /work/ssh/source/ openssh-4.6p1
    #./configure —host=arm-none-linux-gnueabi —with-libs —with-zlib=/work/ssh/install/zlib-1.2.11 —with-ssl-dir=/work/ssh/install/openssl-0.9.8e —disable-etc-default-login CC=arm-none-linux-gnueabi-gcc AR=arm-none-linux-gnueabi-ar
    #make
    注意:openssh不需要make install

    scp - 图1


    指定使用 ssh 目录
    scp -2rv -S ./ssh hongzhunzhun@192.168.2.102:/tmp/hong ./

    scp -2rv hongzhunzhun@192.168.2.102:/tmp/hong ./