27.12.2012 Views

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

The Virtualization Cookbook for SLES 10 SP2 - z/VM - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.2.8 Configuring SSH keys<br />

SSH sessions are typically authenticated with passwords typed in from the keyboard. With<br />

SSH key-based authentication, sessions can be authenticated with public and private keys so<br />

that no password is needed. SSH key-based authentication can be set up from the cloner<br />

(client) to the virtual servers. If the master image has a copy of cloner’s public key in the file<br />

/etc/ssh/authorized_keys, then key based authentication will work to the cloned virtual<br />

servers.<br />

► Create a new DSA key in the directory /root/.ssh/. If the directory /root/.ssh/ does not<br />

yet exist, then first create it with the mkdir command.<br />

# cd /root/.ssh<br />

# ssh-keygen -t dsa -P "" -f id_dsa<br />

Generating public/private dsa key pair.<br />

Your identification has been saved in id_dsa.<br />

Your public key has been saved in id_dsa.pub.<br />

<strong>The</strong> key fingerprint is:<br />

96:19:83:28:27:84:45:01:fa:e0:c8:8e:62:b8:01:30 root@gpok222.endicott.ibm.com<br />

<strong>The</strong> key's randomart image is:<br />

+--[ DSA <strong>10</strong>24]----+<br />

|.==. |<br />

|o. . . |<br />

|E o o . o |<br />

|=+ + = |<br />

|oo. S |<br />

|= . |<br />

|=o |<br />

|oo |<br />

|. |<br />

+-----------------+<br />

► This creates a key pair where the file with the .pub suffix is the public key and the other file<br />

is the private key. Note that the private key is only readable by root:<br />

# ls -l id_dsa*<br />

-rw-------. 1 root root 668 Oct 19 16:49 id_dsa<br />

-rw-r--r--. 1 root root 619 Oct 19 16:49 id_dsa.pub<br />

<strong>The</strong>se files will be copied to the golden image later in the next chapter.<br />

7.2.9 Inserting the vmcp module<br />

To issue CP commands the vmcp module is needed. By default it is not loaded at boot time.<br />

One way to accomplish this is to add the modprobe vmcp command, which will insert the<br />

module, to the file /etc/rc.d/rc.local which is run at boot time:<br />

# cd /etc/rc.d<br />

# vi rc.local // add one line<br />

...<br />

touch /var/lock/subsys/local<br />

modprobe vmcp<br />

<strong>The</strong> vmcp command will now be available after the next reboot.<br />

7.2.<strong>10</strong> Changing the order of the swap disks<br />

It is likely that the order of swap space priority is not optimal. Per<strong>for</strong>m the following<br />

commands:<br />

Chapter 7. Installing RHEL 6 on the cloner 125

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!