Open main menu

CDOT Wiki β

Changes

OPS335 Lab 1

1 byte removed, 09:39, 17 January 2017
Generating a Public/Private Key Pair & Sharing Public Key
If you have the private key, you can prove to someone who has your public key that you are indeed the '''actual owner of that public key'''. That is how ssh key authentication works. You are then only required to transfer your public key to a remote server.
<ulol><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></ulol>
{{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.}}
# Refer to the above notes to allow an ssh connection from your host machine to any of your Virtual Machines (''vm1'', ''vm2'', ''vm3'') without requiring a password.
# Test each ssh connection between host and each virtual machine to ensure that this works.
 
== INVESTIGATION 3: PERFORMING &amp; AUTOMATING BACKUPS ==
13,420
edits