Web Artisan Blog - ウェブ アルチザン ブログ

OpenSSHの設定について

Linux・Unix・Apache (19 items)

2004年06月23日

1.sshd_configの編集

# vi /etc/ssh/sshd_config
PasswordAuthentication no RSA秘密鍵 identityを必須
PermitRootLogin no rootでのログインを禁止
PermitEmptyPasswords no パスワード無しのログインを許可
RhostsRSAAuthentication no .rhosts等を信用
AllowUsers xxxx ユーザxxxxの接続を許可



2.再起動を行います。

# /etc/rc.d/init.d/sshd restart



3.自動起動の設定を行います。

# /sbin/chkconfig --add sshd
# /sbin/chkconfig --list sshd
sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off




4.鍵の作成

アカウント xxxx でログイン
ssh-keygenを実行

パスフレーズを入力
作成された秘密鍵をクライアントマシンに設定

$ ssh-keygen -t rsa1
Generating public/private rsa1 key pair.
Enter file in which to save the key (/root/.ssh/identity):
/root/.ssh/identity already exists.
Enter passphrase (empty for no passphrase):*************
Enter same passphrase again:*************

$ cd /home/xxxx/.ssh/
$ cp identity.pub authorized_keys



identity をクライアントマシンに設定
SSHで接続できることを確認

5.SSHでの接続が確認後、telnetサービスを停止

# vi inetd.conf
#telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
# /etc/rc.d/init.d/inetd restart



前の記事 次の記事

Comments

コメントは、まだ書かれていません

Add Comments

Trackback

トラックバックはありません

Trackback URL

http://www.res-system.com/weblog/action.php?action=plugin&name=TrackBack&tb_id=104