久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    移植ssh到arm

     mrjbydd 2013-08-06
    1. 下載需要的源碼:
        mkdir -p ~/arm/fs ;mkdir -p ~/arm/source
        下載zlib: wget -c http://www./zlib-1.2.3.tar.gz
        下載ssl: wget -c http://www./source/openssl-0.9.8d.tar.gz
        下載ssh: wget -c http://mirror.mcs./openssh/portable/openssh-4.6p1.tar.gz


    2. 編譯:
        cd ~/arm/source

        (1) 編譯zlib:
         tar zxvf zlib-1.2.3.tar.gz -C .
         cd zlib-1.2.3/
         ./configure --prefix=/home/david/fs/zlib-1.2.3
        修改Makefile:
           CC=gcc 改為:
           CROSS=arm-linux-
       CC=$(CROSS)gcc
           LDSHARED=gcc 改為: LDSHARED=$(CROSS)gcc
           CPP=gcc -E   改為: CPP=$(CROSS)gcc -E
           AR=ar rc     改為: AR=$(CROSS)ar rc
    開始編譯: make;
               make install

       (2) 編譯openssl:
           tar zxvf openssl-0.9.8d.tar.gz
        ./Configure --prefix=/home/david/fs/openssl-0.9.8d os/compiler:arm-linux-gcc
        make
        make install

       (3) 編譯openssh:
        tar zxvf openssh-4.6p1.tar.gz
        cd openssh-4.6p1/
        ./configure --host=arm-linux --with-libs --with-zlib=/home/linksens/tools/fs/zlib-1.2.3
             --with-ssl-dir=/home/david/fs/openssl-0.9.8d --disable-etc-default-login    
             CC=arm-linux-gcc AR=arm-linux-ar
          make
        ##不要make install


    3. 安裝
        
        (1) 將 openssh-4.6p1目錄下的 sshd 拷貝到 目標板的/usr/sbin目錄下
        (2) 再copy scp   sftp  ssh   ssh-add   ssh-agent   ssh-keygen   ssh-keyscan 到目標板/usr/local/bin目錄下
              copy 
    sftp-server   ssh-keysign    到/usr/local/libexec
           
        (3) 在目標板下:

            mkdir -p /usr/local/etc/ 
            然后將openssh下的sshd_config,ssh_config 拷貝到該目錄下

            mkdir -p /var/run; mkdir -p /var/empty/sshd 
            chmod 755 /var/empty     
        (4)在主機上:
                      ssh-keygen -t rsa1 -f ssh_host_key -N ""
         
        ssh-keygen -t rsa -f ssh_host_rsa_key -N ""
             
    ssh-keygen -t dsa -f ssh_host_dsa_key -N ""
            將生存的 ssh_host_* 4個文件copy到目標板的 /usr/local/etc/目錄下
         (5) 添加用戶:
        將主機上 /etc/目下的 passwd, shadow, group 三個文件copy到目標板的 /etc目錄下, 同時記得將passwd的最后 /bin/bash 該為 /bin/sh 
        其實可以刪除不需要的一些用戶。
         
    4.測試
       目標板啟動sshd: # /usr/sbin/sshd
         主機: $ ssh root@192.168.237.239

    ps: 紅色的那些代表讓arm做ssh server時必須的

    以上參考:http://hi.baidu.com/fcni_cn/blog/item/4a3ee7115e08cd18b8127b4f.html


    遇到問題:
    1 Permissions 0644 for '/usr/local/etc/ssh_host_key' are too open
    此為文件的權限問題,解決方法為:

    # cd /usr/local/etc

    # ls

    moduli ssh_host_dsa_key ssh_host_key ssh_host_rsa_key sshd_config

    ssh_config ssh_host_dsa_key.pub ssh_host_key.pub ssh_host_rsa_key.pub

    # ls -l

    total 194

    -rwxr-xr-x 1 bin bin 88039 Nov 21 2002 moduli

    -rwxr-xr-x 1 bin bin 1144 Nov 21 2002 ssh_config

    -rwxr-xr-x 1 root other 672 Dec 19 13:55 ssh_host_dsa_key

    -rwxr-xr-x 1 root other 600 Dec 19 13:55 ssh_host_dsa_key.pub

    -rwxr-xr-x 1 root other 525 Dec 19 13:54 ssh_host_key

    -rwxr-xr-x 1 root other 329 Dec 19 13:54 ssh_host_key.pub

    -rwxr-xr-x 1 root other 887 Dec 19 13:55 ssh_host_rsa_key

    -rwxr-xr-x 1 root other 220 Dec 19 13:55 ssh_host_rsa_key.pub

    -rwxr-xr-x 1 bin bin 2470 Nov 21 2002 sshd_config

    # chmod 0644 *

    # ls -l

    total 194

    -rw-r--r-- 1 bin bin 88039 Nov 21 2002 moduli

    -rw-r--r-- 1 bin bin 1144 Nov 21 2002 ssh_config

    -rw-r--r-- 1 root other 672 Dec 19 13:55 ssh_host_dsa_key

    -rw-r--r-- 1 root other 600 Dec 19 13:55 ssh_host_dsa_key.pub

    -rw-r--r-- 1 root other 525 Dec 19 13:54 ssh_host_key

    -rw-r--r-- 1 root other 329 Dec 19 13:54 ssh_host_key.pub

    -rw-r--r-- 1 root other 887 Dec 19 13:55 ssh_host_rsa_key

    -rw-r--r-- 1 root other 220 Dec 19 13:55 ssh_host_rsa_key.pub

    -rw-r--r-- 1 bin bin 2470 Nov 21 2002 sshd_config

    # chmod 0600 ssh_host_dsa_key ssh_host_key ssh_host_rsa_key

    # ls -l

    total 194

    -rw-r--r-- 1 bin bin 88039 Nov 21 2002 moduli

    -rw-r--r-- 1 bin bin 1144 Nov 21 2002 ssh_config

    -rw------- 1 root other 672 Dec 19 13:55 ssh_host_dsa_key

    -rw-r--r-- 1 root other 600 Dec 19 13:55 ssh_host_dsa_key.pub

    -rw------- 1 root other 525 Dec 19 13:54 ssh_host_key

    -rw-r--r-- 1 root other 329 Dec 19 13:54 ssh_host_key.pub

    -rw------- 1 root other 887 Dec 19 13:55 ssh_host_rsa_key

    -rw-r--r-- 1 root other 220 Dec 19 13:55 ssh_host_rsa_key.pub

    -rw-r--r-- 1 bin bin 2470 Nov 21 2002 sshd_config

    2 在ssh目標機時出現

    ssh root@192.168.237.239

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @

    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

    IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!

    Someone could be eavesdropping on you right now (man-in-the-middle attack)!

    It is also possible that the RSA host key has just been changed.

    The fingerprint for the RSA key sent by the remote host is

    97:ff:ec:78:48:69:c0:61:1d:82:9b:6c:2e:6b:6b:46.

    Please contact your system administrator.

    Add correct host key in /root/.ssh/known_hosts to get rid of this message.

    Offending key in /root/.ssh/known_hosts:11

    RSA host key for 192.168.237.239 has changed and you have requested strict checking.

    Host key verification failed.

    警告中已經說

      本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發布,不代表本站觀點。請注意甄別內容中的聯系方式、誘導購買等信息,謹防詐騙。如發現有害或侵權內容,請點擊一鍵舉報。
      轉藏 分享 獻花(0

      0條評論

      發表

      請遵守用戶 評論公約

      類似文章 更多

      主站蜘蛛池模板: 欧美牲交A欧美牲交| 国内精品久久久久影院优| 一区二区和激情视频| 中文字幕人成乱码中文乱码| 亚洲精品免费一二三区| 久久综合色一综合色88| 国产精品久久国产精麻豆99网站| 羞羞影院午夜男女爽爽免费视频| 欧美亚洲国产一区二区三区| 国精偷拍一区二区三区| 西西人体44WWW高清大胆| 四虎精品视频永久免费| 少妇富婆高级按摩出水高潮| 亚洲av无码乱码在线观看野外| 国产综合有码无码中文字幕 | 国产一区二区三区导航| 国产精品毛片无遮挡高清| 国产超碰无码最新上传| 色橹橹欧美在线观看视频高清 | 在线 欧美 中文 亚洲 精品| 在厨房被C到高潮A毛片奶水| 国产精品自在拍首页视频8| 国产精品国产三级国产试看| 五月丁香六月综合缴清无码| 噜噜综合亚洲av中文无码| 欧美牲交A欧美在线| 男女动态无遮挡动态图| 上课忘穿内裤被老师摸到高潮| 丰满的少妇被猛烈进入白浆| 在线涩涩免费观看国产精品| 午夜三级A三级三点在线观看| 日本高清在线观看WWW色| 久久夜色精品国产嚕嚕亚洲AV| 亚洲精品久久久久久婷婷| 亚洲av永久无码精品漫画| AV在线亚洲欧洲日产一区二区| 人人澡人摸人人添| 日韩精品无码区免费专区| 精品一区二区不卡无码AV| 天天澡日日澡狠狠欧美老妇 | 欧洲国产精品无码专区影院|