Oracle VMの世界

Oracle VMの世界(8)

Oracle VM上でRACを利用する(4)


日本オラクル株式会社
中嶋 一樹
2010/3/16

連載:Oracle VMの世界 INDEX

 SSHの設定

- PR -
 

 次にSSHの認証設定を行います。まずoracleユーザーにパスワードを設定します。次にそのoracleユーザーにスイッチし、sshkeygenコマンドを使ってDSA公開鍵、非公開鍵のペアを作成します。

[root@a1]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated  successfully.

[root@a1]# su - oracle
[oracle@a1]$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key  (/home/oracle/.ssh/id_dsa):
Created directory '/home/oracle/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in  /home/oracle/.ssh/id_dsa.
Your public key has been saved in  /home/oracle/.ssh/id_dsa.pub.
The key fingerprint is:
0f:d0:a6:11:ee:07:1b:65:41:12:87:ac:08:ab:cb:3b  oracle@a1.ovm.oracle.com

[oracle@a1]$

 a2でも同様にこの作業を実施してください。

 次にa1に戻り、相互にDSA公開鍵を登録するために以下の作業を実施します。

[oracle@a1]$ cat  /home/oracle/.ssh/id_dsa.pub > /home/oracle/.ssh/authorized_keys
[oracle@a1]$ chmod 600  /home/oracle/.ssh/authorized_keys
[oracle@a1]$ ssh a2 "cat  /home/oracle/.ssh/id_dsa.pub" >> /home/oracle/.ssh/authorized_keys
The authenticity of host 'a2  (192.168.0.102)' can't be established.
RSA key fingerprint is  6d:24:3a:0a:cd:62:1c:ba:df:77:d1:fc:d7:95:8b:ce.
Are you sure you want to continue  connecting (yes/no)? yes
oracle@a2's password:

[oracle@a1]$ scp  /home/oracle/.ssh/authorized_keys a2:/home/oracle/.ssh/
oracle@a2's password:
authorized_keys 100% 1228 1.2KB/s 00:00

[oracle@a1]$

 実際に以下のパターンでsshを実行し、すべてパスワードなしでログインできることを確認してください。

  • a1上のoracleユーザーからa2へ
  • a1上のoracleユーザーからa1へ
  • a2上のoracleユーザーからa1へ
  • a2上のoracleユーザーからa2へ
2/3

Index
Oracle VM上でRACを利用する(4)
  Page1
仮想マシンに仮想ディスクを追加
ネットワークの設定
Page2
SSHの設定
  Page3
ディスクのパーティション設定
インストール領域の準備

Server & Storage フォーラム 新着記事
@ITメールマガジン 新着情報やスタッフのコラムがメールで届きます(無料)

注目のテーマ

Server & Storage 記事ランキング

本日 月間