WWW サーバ
O R A N G E

ssh
■ メモ
  • 2003 年度よりセキュリティの高い ssh2 をデフォルトで使用する.
    だたし, ssh1 のサポートも従来通り行う(mac, win のソフトが揃っていないため).
  • ssh1,2 ともに nonpasslogin を可能にする. これは gate-toruku-system のみならず グループユーザにおける自動データ転送等に用いられる.
  • ssh における x 転送を許可する. (ただし, 2003 年度は x がまだ上がっていないため不可能である)
■ X 転送許可
  • sshd の設定ファイルを以下のように変更する
    # vi /etc/ssh/sshd_config

    ---------------
    X11Forwarding yes
    ---------------
■ nonpasslogin 設定 (ssh する場合)
  1. /usr/bin/ssh, /usr/lib/ssh-keysign の s ビットが立っているか確認する.
    $ ls -l /usr/bin/ssh /usr/lib/ssh-keysign

    -rwsr-xr-x 1 root root 230248 Jul 12 19:52 /usr/bin/ssh
    -rwsr-xr-x 1 root root 151496 Jun 20 01:23 /usr/lib/ssh-keysign
    たっていない場合はパーミッションを変更する.
    # chmod 4755 /usr/bin/ssh /usr/lib/ssh-keysign

  2. ssh の設定ファイルに以下の二行を追加する.
    # vi /etc/ssh/ssh_config

    ---------------
    HostbasedAuthentication yes
    PreferredAuthentications hostbased,publickey,password
    ---------------
■ nonpasslogin 設定 (ssh される場合)
  1. sshd の設定ファイルを以下のように変更する
    # vi /etc/ssh/sshd_config

    ---------------
    # Don't read the user's ~/.rhosts and ~/.shosts files
    IgnoreRhosts no
    # For this to work you will also need host keys in /etc/ssh_known_hosts
    RhostsRSAAuthentication yes
    # similar for protocol version 2
    HostbasedAuthentication yes
    # Change to yes to enable tunnelled clear text passwords
    PasswordAuthentication yes
    ---------------
  2. 再起動
    # /etc/init.d/ssh restart
■ nonpasslogin のテスト(ユーザレベルでの設定)

今回の場合, orange -> orange の nonpasslogin が行えればよい.
(別サーバへのテストを行う場合は, こちらを参照のこと)

  1. ユーザレベルでの許可設定のファイルを作成
    mondo5@orange$ echo "orange.ep.sci.hokudai.ac.jp mondo5" > ~mondo5/.shosts
    mondo5@orange$ chmod 600 ~mondo5/.shosts
  2. ssh コマンドを実行
    mondo5@orange$ ssh orange.ep.sci.hokudai.ac.jp

    The authenticity of host 'orange.ep.sci.hokudai.ac.jp (133.87.45.72)' can't be established.
    RSA key fingerprint is ##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##.
    Are you sure you want to continue connecting (yes/no)? yes

    mondo5@orange$
    上記の通り, パスワードを聞かれずに login が成功したら OK.
Copyright © 2003 EPnetFaN
最終更新日: 2003/03/19 (光田 千紘)