Changes

Jump to: navigation, search

OPS335 Lab 1

2 bytes added, 08:45, 18 January 2017
Generating a Public/Private Key Pair & Sharing the Public Key
<ol><li value="4">You are going to share the public key from the '''root user in your host machine''' with the '''root user of your vm1 machine'''.</li><li>Make certain you are logged on as '''root'''.</li><li>Copy contents of your '''~/.ssh/id_rsa.pub''' from your host machine, and append the contents to '''~/.ssh/authorized_keys''' on each of your Virtual Machine servers</li><li>Simply issue the Linux command '''ssh-copy-id -i ~/.ssh/id_rsa.pub username@server'''<br><br>In your case: ssh-copy-id -i ~/.ssh/id_rsa.pub root@IPADDR_for_vm1</li><li>Make certain to copy the public key for root on your host to your vm2 and vm3 machines as well.</li><li>Use the ssh command to test each ssh connection between your host and each virtual machine that you can connect to the VMs without having to use a password. This is essential to create backups from VMs to your hostmachine without being prompted for password.</li></ol>
 
{{Admon/important|Errors in Copying Public Key from Host to VM|If you experience an error when copying the public key from your hostmachine to your VM, it is most likely caused from not permitting root login that you performed in the previous section. Set to allow login from root for each vm, restart your sshd service and then re-run the above command.}}
 
After you perform either of those operations, you can then ssh into a remote vm without a password.
:::'''Steps:'''
:::*Issue the following command to download the bash shell script:<br>'''wget http://matrix.senecac.on.ca/~murray.saul/ops335/labcheck_network_backup.sh'''
::::*Assign execute permissions, and run the script to check your work: '''labcheck_network_backup.sh'''
::::*When prompted for the network interface, use the '''virtual interface'''.
 
== EXPLORATION QUESTIONS ==
13,420
edits

Navigation menu