Homepage

wget ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-3.9p1.tar.gz
wget http://www.openssl.org/source/openssl-0.9.7e.tar.gz
wget http://www.zlib.net/zlib-1.2.1.tar.gz

tar zxvf openssh-3.9p1.tar.gz
tar zxvf openssl-0.9.7e.tar.gz
tar zxvf zlib-1.2.1.tar.gz

sudo groupadd sshd
sudo useradd -g root sshd

  • zlib
    ./configure
    make
    sudo make install
  • OpenSSL
    ./config
    make 
    sudo make install
  • OpenSSL for Solaris 64bit
    ./Configure solaris-sparcv8-gcc
    make
    sudo make install
  • OpenSSH
    ./configure --with-zlib=/usr/local/lib \
                --with-ssl-dir=/usr/local/ssl \
                --with-md5-passwords
    make
    sudo make install

  • Port 22
    
    Protocol 2,1
    
    HostKey /usr/local/etc/ssh_host_key
    
    HostKey /usr/local/etc/ssh_host_rsa_key
    HostKey /usr/local/etc/ssh_host_dsa_key
    
    PermitRootLogin no
    
    PasswordAuthentication no
    
    PermitEmptyPasswords no
    
    AllowUsers nuzou
  • /etc/init.d/ssh
    #!/bin/sh
    
    SSH_PATH=/usr/local/sbin/sshd
    SSH_CONFIG=/usr/local/etc/sshd_config
    SSH_PID=/var/run/sshd.pid 
    
    RET_VAL=0 
    
    case "$1" in
            start)
                    # Start daemons.
                    if [ ! -f ${SSH_PID} ]; then
                            echo "Start sshd"
                            ${SSH_PATH} -f ${SSH_CONFIG} > /dev/null 2>&1
                    else
                            echo "sshd already run"
                            RET_VAL=1
                    fi
                    ;;
            stop)
                    # Stop daemons.
                    if [ -f ${SSH_PID} ]; then
                            echo "Stop sshd"
                            kill -15 `cat ${SSH_PID}`
                    else
                            echo "sshd not run" > /dev/null 2>&1
                            RET_VAL=1
                    fi
                    ;;
            restart)
                    $0 stop
                    $0 start
                    ;;
            *)
                    echo "Usage: $0 {start|stop|restart}"
                    RET_VAL=1
                    ;;
    esac
    
    exit ${RET_VAL}
  • cd /etc/rc0.d
    ln -s ../init.d/ssh K20ssh
    cd /etc/rc1.d
    ln -s ../init.d/ssh K20ssh
    cd /etc/rc2.d
    ln -s ../init.d/ssh S20ssh
    cd /etc/rc3.d
    ln -s ../init.d/ssh S20ssh
    cd /etc/rc4.d
    ln -s ../init.d/ssh S20ssh
    cd /etc/rc5.d
    ln -s ../init.d/ssh S20ssh
    cd /etc/rc6.d
    ln -s ../init.d/ssh K20ssh
    

  • ssh-keygen -t rsa1
    cd .ssh/
    

TeraTerm? + TTSSH




添付ファイル: filettssh.PNG 1453件 [詳細]


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: Tue, 12 Oct 2021 01:02:27 JST (421d)