Início > Oracle > Oracle RAC 11g R2: sshUserSetup.sh

Oracle RAC 11g R2: sshUserSetup.sh

Ao configurar o Oracle RAC você precisa configurar os nós do RAC para que sejam acessíveis via SSH.

Isso pode ser manualmente, ou você pode utilizar o utilitário sshUserSetup.sh que esta na pasta sshsetup da midia de instalação do Grid.

./sshUserSetup.sh -user oracle -hosts "RAC01 RAC02" -noPromptPassphrase

Segue abaixo um exemplo da execução do utilitário:

[oracle@RAC01 sshsetup]$ ./sshUserSetup.sh -user oracle -hosts "RAC01 RAC02" -noPromptPassphrase
The output of this script is also logged into /tmp/sshUserSetup_2010-12-22-15-39-18.log
Hosts are RAC01 RAC02
user is oracle
Platform:- Linux
Checking if the remote hosts are reachable
PING RAC01.localdomain (192.168.1.1) 56(84) bytes of data.
64 bytes from RAC01.localdomain (192.168.1.1): icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from RAC01.localdomain (192.168.1.1): icmp_seq=2 ttl=64 time=0.019 ms
64 bytes from RAC01.localdomain (192.168.1.1): icmp_seq=3 ttl=64 time=0.017 ms
64 bytes from RAC01.localdomain (192.168.1.1): icmp_seq=4 ttl=64 time=0.017 ms
64 bytes from RAC01.localdomain (192.168.1.1): icmp_seq=5 ttl=64 time=0.018 ms
--- RAC01.localdomain ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 3999ms
rtt min/avg/max/mdev = 0.017/0.017/0.019/0.004 ms
PING RAC02.localdomain (192.168.1.2) 56(84) bytes of data.
64 bytes from RAC02.localdomain (192.168.1.2): icmp_seq=1 ttl=64 time=0.331 ms
64 bytes from RAC02.localdomain (192.168.1.2): icmp_seq=2 ttl=64 time=0.109 ms
64 bytes from RAC02.localdomain (192.168.1.2): icmp_seq=3 ttl=64 time=0.324 ms
64 bytes from RAC02.localdomain (192.168.1.2): icmp_seq=4 ttl=64 time=0.256 ms
64 bytes from RAC02.localdomain (192.168.1.2): icmp_seq=5 ttl=64 time=0.257 ms
--- RAC02.localdomain ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4000ms
rtt min/avg/max/mdev = 0.109/0.255/0.331/0.081 ms
Remote host reachability check succeeded.
The following hosts are reachable: RAC01 RAC02.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost RAC01
numhosts 2
The script will setup SSH connectivity from the host RAC01 to all
the remote hosts. After the script is executed, the user can use SSH to run
commands on the remote hosts or copy files between this host RAC01
and the remote hosts without being prompted for passwords or confirmations.
NOTE 1:
As part of the setup procedure, this script will use ssh and scp to copy
files between the local host and the remote hosts. Since the script does not
store passwords, you may be prompted for the passwords during the execution of
the script whenever ssh or scp is invoked.
NOTE 2:
AS PER SSH REQUIREMENTS, THIS SCRIPT WILL SECURE THE USER HOME DIRECTORY
AND THE .ssh DIRECTORY BY REVOKING GROUP AND WORLD WRITE PRIVILEDGES TO THESE
directories.
Do you want to continue and let the script make the above mentioned changes (yes/no)?
yes
The user chose yes
User chose to skip passphrase related questions.
Creating .ssh directory on local host, if not present already
Creating authorized_keys file on local host
Changing permissions on authorized_keys to 644 on local host
Creating known_hosts file on local host
Changing permissions on known_hosts to 644 on local host
Creating config file on local host
If a config file exists already at /home/oracle/.ssh/config, it would be backed up to /home/oracle/.ssh/config.backup.
Removing old private/public keys on local host
Running SSH keygen on local host with empty passphrase
Generating public/private rsa key pair.
Your identification has been saved in /home/oracle/.ssh/id_rsa.
Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.
The key fingerprint is:
de:e3:66:fa:16:e8:6e:36:fd:c5:e3:77:75:07:9a:b0 oracle@RAC01
Creating .ssh directory and setting permissions on remote host RAC01
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host RAC01. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host RAC01.
Warning: Permanently added 'RAC01,192.168.1.1' (RSA) to the list of known hosts.
oracle@RAC01's password:
Done with creating .ssh directory and setting permissions on remote host RAC01.
Creating .ssh directory and setting permissions on remote host RAC02
THE SCRIPT WOULD ALSO BE REVOKING WRITE PERMISSIONS FOR group AND others ON THE HOME DIRECTORY FOR oracle. THIS IS AN SSH REQUIREMENT.
The script would create ~oracle/.ssh/config file on remote host RAC02. If a config file exists already at ~oracle/.ssh/config, it would be backed up to ~oracle/.ssh/config.backup.
The user may be prompted for a password here since the script would be running SSH on host RAC02.
Warning: Permanently added 'RAC02,192.168.1.2' (RSA) to the list of known hosts.
oracle@RAC02's password:
Done with creating .ssh directory and setting permissions on remote host RAC02.
Copying local host public key to the remote host RAC01
The user may be prompted for a password or passphrase here since the script would be using SCP for host RAC01.
oracle@RAC01's password:
Done copying local host public key to the remote host RAC01
Copying local host public key to the remote host RAC02
The user may be prompted for a password or passphrase here since the script would be using SCP for host RAC02.
oracle@RAC02's password:
Done copying local host public key to the remote host RAC02
cat: /home/oracle/.ssh/known_hosts.tmp: No such file or directory
cat: /home/oracle/.ssh/authorized_keys.tmp: No such file or directory
SSH setup is complete.
------------------------------------------------------------------------
Verifying SSH setup
===================
The script will now run the date command on the remote nodes using ssh
to verify if ssh is setup correctly. IF THE SETUP IS CORRECTLY SETUP,
THERE SHOULD BE NO OUTPUT OTHER THAN THE DATE AND SSH SHOULD NOT ASK FOR
PASSWORDS. If you see any output other than date or are prompted for the
password, ssh is not setup correctly and you will need to resolve the
issue and set up ssh again.
The possible causes for failure could be:
1. The server settings in /etc/ssh/sshd_config file do not allow ssh
for user oracle.
2. The server may have disabled public key based authentication.
3. The client public key on the server may be outdated.
4. ~oracle or ~oracle/.ssh on the remote host may not be owned by oracle.
5. User may not have passed -shared option for shared remote users or
may be passing the -shared option for non-shared remote users.
6. If there is output in addition to the date, but no password is asked,
it may be a security alert shown as part of company policy. Append the
additional text to the <OMS HOME>/sysman/prov/resources/ignoreMessages.txt file.
------------------------------------------------------------------------
--RAC01:--
Running /usr/bin/ssh -x -l oracle RAC01 date to verify SSH connectivity has been setup from local host to RAC01.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Wed Dec 22 15:40:10 GMT 2010
------------------------------------------------------------------------
--RAC02:--
Running /usr/bin/ssh -x -l oracle RAC02 date to verify SSH connectivity has been setup from local host to RAC02.
IF YOU SEE ANY OTHER OUTPUT BESIDES THE OUTPUT OF THE DATE COMMAND OR IF YOU ARE PROMPTED FOR A PASSWORD HERE, IT MEANS SSH SETUP HAS NOT BEEN SUCCESSFUL. Please note that being prompted for a passphrase may be OK but being prompted for a password is ERROR.
Wed Dec 22 15:40:10 GMT 2010
------------------------------------------------------------------------
SSH verification complete.
[oracle@RAC01 sshsetup]$ ssh RAC01 hostname
RAC01
[oracle@RAC01 sshsetup]$ ssh RAC02 hostname
RAC02
[oracle@RAC01 sshsetup]$
Categorias:Oracle
  1. Nenhum comentário ainda.
  1. No trackbacks yet.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: