Monday, October 29, 2012

HP UX : Creating a trusted host environment using SSH




The trusted host environment as an alternative to setting up public-private SSH key pairs.
For automation or in a scripted environment in which these types of calls are necessary, the trusted host network,
though still bearing some security risks, has advantages over the public-private key pair scenario.
A trusted host network or trusted host authentication relies primarily on preconfigured files that list a combination of users and hosts that are allowed access.
There are two types of trusted-host authentication. The older (such as for OpenSSH and SSH1) and weaker uses the clear-text protocol commands (rsh, rcp, and rlogin);

checks the two files; and sets one keyword in the sshd_config file:
/etc/hosts.equiv
~/.rhosts

SSH Protocol 2 does not support this method. Instead, for a more secure trusted host network,
make the following changes in the /etc/ssh/sshd_config file (which accepts host names or IP Addresses),
and configure the shosts.equiv and/or the .shosts files:

/etc/shosts.equiv
~/.shosts

To enable a trusted-host environment in the /etc/ssh/sshd_config file for SSH Protocol 2, use:
PermitEmptyPasswords yes
AllowSHosts remoteclient.com
DenySHosts

For example, if you were on the server example.com and had configured your /etc/shosts.equiv file as follows:

+remoteclient.com fsmythe
+secureserver.net sallyh
+192.168.100.12 fsmythe
-hackers.org james

you would allow user fsmythe trusted host authentication from the remote sources remoteclient.com, 192.168.100.12, and secureserver.net and user sallyh access from secureserver.net,
denying access from user james at the remote source hackers.org. The trusted-host authentication and public-private SSH key pair authentication methods are similar and to a greater end achieve the same results.

Thursday, October 4, 2012

How do I move a Volume Group from one system to another?

We recently moved a server from one location to other but SAN as replicated one, not the original LUNs which were in use. Below are the steps followed.



1. Make sure to stop all the access to device coming from the old storage. You may need to unmount the devices if in use. Verify with the lsof command that no device is being used.

2. Poweroff the server. (step 1 can be skipped)

3. Detach the old storage.

4. Reboot the server and verify that it is booting correctly and no traces of old storage are present.

5. Poweroff the server. Move to another location. I assume here that the same multipathing software is being used, in our case it is EMC powerpath.

6. connect the server to new storage [Replicated disks] and boot the server.

7. All the LUNs should come up with the multipathing software. Any VGs should get activated.


You may also be interested in reading the following article (Commands in detail)

 https://access.redhat.com/knowledge/solutions/4123   How do I move a Volume Group from one system to another?