OpenSSH サーバープログラムの実体は、sshd というデーモンです。Turbolinux 10 Server で sshd の起動や停止を行うには、/etc/init.d/sshd スクリプトに以下のオプションを指定して実行します。
表 20-2. /etc/init.d/sshd
| オプション | 操作 |
|---|---|
| start | sshd デーモンを起動します。ホスト認証用鍵が存在しない場合にのみ、起動前にこれらを作成します。 |
| stop | sshd デーモンを停止します。 |
| restart | sshd デーモンを再起動します。stop にあとに start を実行します。 |
| status | sshd デーモンの起動状態を確認します。 |
| reread | 設定ファイルを再読込みします。 |
| condrestart | デーモンが動作しているかを確認後、再起動します。(/var/lock/subsys/sshd が存在するとき再起動します。) |
sshd を起動するには、以下のコマンドを実行します。
# /etc/init.d/sshd start |
sshd を停止するには、以下のコマンドを実行します。
# /etc/init.d/sshd stop |
Turbolinux 10 Server の起動時に sshd を自動的に開始するには、以下のように chkconfig コマンドを実行しておきます。
# chkconfig sshd on |
sshd の設定ファイル /etc/ssh/sshd_config を変更した場合は、変更を反映するために sshd を再起動します。
# /etc/init.d/sshd restart |
また、sshd は、TCP Wrapper ライブラリ利用したアクセス制御を行います。Turbolinux 10 Server の /etc/hosts.allow では、以下のようにすべてのクライアントからのアクセス要求を許可しています。必要に応じてアクセス可能なクライアントを制限してください。
sshd : ALL |
/etc/hosts.allow の編集については、項19.1 を参照してください。