Monday, 31 July 2017

SSH connectivity chck in while grid installation.


-rwxr-xr-x 1 oracle oinstall 32343 Aug 26  2013 sshUserSetup.sh
[oracle@oraracn1 sshsetup]$ ./sshUserSetup.sh -user oracle -hosts "oraracn1 oraracn2" -noPromptPassphrase -confirm -advanced
The output of this script is also logged into /tmp/sshUserSetup_2017-08-01-04-54-34.log
Hosts are oraracn1 oraracn2
user is oracle
Platform:- Linux
Checking if the remote hosts are reachable
PING oraracn1.oraclegenesis.com (192.168.1.111) 56(84) bytes of data.
64 bytes from oraracn1.oraclegenesis.com (192.168.1.111): icmp_seq=1 ttl=64 time=0.036 ms
64 bytes from oraracn1.oraclegenesis.com (192.168.1.111): icmp_seq=2 ttl=64 time=0.040 ms
64 bytes from oraracn1.oraclegenesis.com (192.168.1.111): icmp_seq=3 ttl=64 time=0.042 ms
64 bytes from oraracn1.oraclegenesis.com (192.168.1.111): icmp_seq=4 ttl=64 time=0.041 ms
64 bytes from oraracn1.oraclegenesis.com (192.168.1.111): icmp_seq=5 ttl=64 time=0.042 ms

--- oraracn1.oraclegenesis.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4003ms
rtt min/avg/max/mdev = 0.036/0.040/0.042/0.004 ms
PING oraracn2.oraclegenesis.com (192.168.1.112) 56(84) bytes of data.
64 bytes from oraracn2.oraclegenesis.com (192.168.1.112): icmp_seq=1 ttl=64 time=1.36 ms
64 bytes from oraracn2.oraclegenesis.com (192.168.1.112): icmp_seq=2 ttl=64 time=0.602 ms
64 bytes from oraracn2.oraclegenesis.com (192.168.1.112): icmp_seq=3 ttl=64 time=0.611 ms
64 bytes from oraracn2.oraclegenesis.com (192.168.1.112): icmp_seq=4 ttl=64 time=0.629 ms
64 bytes from oraracn2.oraclegenesis.com (192.168.1.112): icmp_seq=5 ttl=64 time=0.609 ms

--- oraracn2.oraclegenesis.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4006ms
rtt min/avg/max/mdev = 0.602/0.762/1.362/0.301 ms
Remote host reachability check succeeded.
The following hosts are reachable: oraracn1 oraracn2.
The following hosts are not reachable: .
All hosts are reachable. Proceeding further...
firsthost oraracn1
numhosts 2
The script will setup SSH connectivity from the host oraracn1.oraclegenesis.com 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 oraracn1.oraclegenesis.com
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)?
Confirmation provided on the command line

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:
71:7b:42:30:a3:fc:1f:83:92:8c:d5:eb:fa:24:11:cc oracle@oraracn1.oraclegenesis.com
The key's randomart image is:
+--[ RSA 1024]----+
|        +        |
|     + o +       |
|      E o o      |
|     + + * .     |
|    . = S = .    |
|       + . =     |
|      . o .      |
|       +         |
|      ...        |
+-----------------+
Creating .ssh directory and setting permissions on remote host oraracn1
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 oraracn1. 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 oraracn1.
Warning: Permanently added 'oraracn1,192.168.1.111' (RSA) to the list of known hosts.
oracle@oraracn1's password:
Done with creating .ssh directory and setting permissions on remote host oraracn1.
Creating .ssh directory and setting permissions on remote host oraracn2
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 oraracn2. 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 oraracn2.
Warning: Permanently added 'oraracn2,192.168.1.112' (RSA) to the list of known hosts.
oracle@oraracn2's password:
Done with creating .ssh directory and setting permissions on remote host oraracn2.
Copying local host public key to the remote host oraracn1
The user may be prompted for a password or passphrase here since the script would be using SCP for host oraracn1.
oracle@oraracn1's password:
Done copying local host public key to the remote host oraracn1
Copying local host public key to the remote host oraracn2
The user may be prompted for a password or passphrase here since the script would be using SCP for host oraracn2.
oracle@oraracn2's password:
Done copying local host public key to the remote host oraracn2
Creating keys on remote host oraracn1 if they do not exist already. This is required to setup SSH on host oraracn1.

Creating keys on remote host oraracn2 if they do not exist already. This is required to setup SSH on host oraracn2.
Generating public/private rsa key pair.
Your identification has been saved in .ssh/id_rsa.
Your public key has been saved in .ssh/id_rsa.pub.
The key fingerprint is:
0b:7f:5a:ec:ee:9f:a3:f6:bb:c1:f3:e6:a1:03:07:76 oracle@oraracn2.oraclegenesis.com
The key's randomart image is:
+--[ RSA 1024]----+
|                 |
|                 |
|                 |
|          o E    |
|      . S. o     |
|       o o...    |
|        o +o+ .  |
|         =. o*.. |
|        .+=+BBo  |
+-----------------+
Updating authorized_keys file on remote host oraracn1
Updating known_hosts file on remote host oraracn1
Updating authorized_keys file on remote host oraracn2
Updating known_hosts file on remote host oraracn2
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.
------------------------------------------------------------------------
--oraracn1:--
Running /usr/bin/ssh -x -l oracle oraracn1 date to verify SSH connectivity has been setup from local host to oraracn1.
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.
Tue Aug  1 04:55:19 IST 2017
------------------------------------------------------------------------
--oraracn2:--
Running /usr/bin/ssh -x -l oracle oraracn2 date to verify SSH connectivity has been setup from local host to oraracn2.
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.
Tue Aug  1 04:55:19 IST 2017
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from oraracn1 to oraracn1
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.
bash: -c: line 0: unexpected EOF while looking for matching `"'
bash: -c: line 1: syntax error: unexpected end of file
------------------------------------------------------------------------
------------------------------------------------------------------------
Verifying SSH connectivity has been setup from oraracn1 to oraracn2
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.
bash: -c: line 0: unexpected EOF while looking for matching `"'
bash: -c: line 1: syntax error: unexpected end of file
------------------------------------------------------------------------
-Verification from complete-
SSH verification complete.
[oracle@oraracn1 sshsetup]$ ssh oracleracn2
ssh: Could not resolve hostname oracleracn2: No address associated with hostname
[oracle@oraracn1 sshsetup]$ ssh oraracn2
Last login: Tue Aug  1 04:44:23 2017 from 192.168.1.100
[oracle@oraracn2 ~]$ shh oraracn1
-bash: shh: command not found
[oracle@oraracn2 ~]$ ssh oraracn1
Last login: Tue Aug  1 04:39:27 2017 from 192.168.1.100
[oracle@oraracn1 ~]$ ssh oraracn1
Last login: Tue Aug  1 04:57:29 2017 from oraracn2.oraclegenesis.com
[oracle@oraracn1 ~]$ yum install ntp
Loaded plugins: refresh-packagekit, security
You need to be root to perform this command.
[oracle@oraracn1 ~]$ su -
Password:
[root@oraracn1 ~]# yum install ntp
Loaded plugins: refresh-packagekit, security
ol6_UEK_latest                                                                                                      | 1.2 kB     00:00
ol6_UEK_latest/primary                                                                                              |  33 MB     00:08
ol6_UEK_latest                                                                                                                     701/701
ol6_latest                                                                                                          | 1.4 kB     00:00
ol6_latest/primary                                                                                                  |  65 MB     00:14
ol6_latest                                                                                                                     39217/39217
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package ntp.x86_64 0:4.2.6p5-1.el6 will be updated
---> Package ntp.x86_64 0:4.2.6p5-10.0.1.el6_8.2 will be an update
--> Processing Dependency: ntpdate = 4.2.6p5-10.0.1.el6_8.2 for package: ntp-4.2.6p5-10.0.1.el6_8.2.x86_64
--> Running transaction check
---> Package ntpdate.x86_64 0:4.2.6p5-1.el6 will be updated
---> Package ntpdate.x86_64 0:4.2.6p5-10.0.1.el6_8.2 will be an update

No comments:

Post a Comment