zoukankan      html  css  js  c++  java
  • ssh交叉编译安装提示代码块临时

    需要文件

    zlib、openssl、openssh

    参阅:

    https://blog.csdn.net/ctbinzi/article/details/5929800

    https://blog.csdn.net/v6543210/article/details/83420034

    说明代码

    arm-linux-gnueabihf-gcc
    
    
    
    mkdir /work/
    mkdir /work/lib
    mkdir /work/ssh
    cd  /work/ssh
    mkdir compressed install source
    
    cd /work/ssh/compressed/
    tar xvf zlib-1.2.11.tar.gz  -C  ../source
    cd ../source/zlib-1.2.11
    ./configure --prefix=/work/ssh/install/zlib-1.2.11
    vim Makefile
    CC=arm-gcc
    AR=arm-ar 
    CPP =arm-gcc -E
    LDSHARED=arm-gcc
    make && make install
    
    
    cd /work/ssh/compressed/
    tar zxvf openssl-1.1.1f.tar.gz  -C  ../source
    cd ../source/openssl-1.1.1f/
    setarch i386 ./config no-asm shared --prefix=/work/ssh/install/openssl --cross-compile-prefix=arm-linux-gnueabihf-gcc
    去掉Makefile的-m32 make && make install cd /work/ssh/compressed/ tar -zxvf openssh-8.2p1.tar.gz -C ../source/ cd ../source/openssh-8.2p1/ ./configure --host=arm-linux-gnueabihf --with-libs --with-zlib=/work/ssh/install/zlib-1.2.11 --with-ssl-dir=/work/ssh/install/openssl/ --disable-etc-default-login CC=arm-linux-gnueabihf-gcc AR=arm-linux-gnueabihf-ar make chmod 0600 ssh_host_key ssh_host_key ssh_host_rsa_key chmod 0644 *

    大部分步骤按照第一篇参阅文档、ssh登录选项等参考第二篇文档。首先是要保证sshd能够在目标板运行。

    configure:error:*** working libcrypto not found,check config.log

    可能不是说openssl的问题,原来从windows拷贝的openssl目标文件,重新交叉编译了一遍openssl竟然通过,可能是说,文件的标记(文件属性)在虚拟机和windows相互传送时候丢失了。

    其它说明

    openssh启动以后,psftp测试,可能是要修改sshd_config文件中override查找字段,设定正确的sftp-server路径。

    sshd对配置文件的权限有要求,应该是600的权限合适。尝试。

  • 相关阅读:
    冲刺(六)
    冲刺(五)
    冲刺(四)
    团队产品开发
    冲刺(三)
    冲刺(二)
    冲刺(一)
    电梯演讲,模型展示
    校园健康行的NABCD分析
    团队博客
  • 原文地址:https://www.cnblogs.com/bai2018/p/12659345.html
Copyright © 2011-2022 走看看