Changes

Jump to: navigation, search

OPS445 Online Lab8

3 bytes added, 08:09, 20 March 2022
m
PART 3: Set up SSH login with public key authentication
==PART 3: Set up SSH login with public key authentication ==
: In order for you to run multiple tasks on multiple remote machines without typing the in the password for each connection, you need to configure your VM to accept SSH public key authentication in addtion to password authentication. You've done this in both OPS235 OPS245 and OPS335OPS345, and here is a summary of how to do it between your account on matrix and your VM:
: # Create a new SSH key pair (one private, and one public) under your account on matrix.senecacollege.ca. : # Once you have both keys, you can use the '''ssh-copy-id''' command to copy your public key to the student account on your VM, replace the port number with the correct value for your VM:<source lang='bash'>
ssh-copy-id -i ~/.ssh/id_rsa.pub -p 7200 student@myvmlab.senecacollege.ca
</source>
: # The above command should add the contents of your pub key to ~/.ssh/authorized_keys under your student account on your VM. ['''Note: ''' If you want to setup another controller workstation, you can either copy to the '''private key''' to it, or generate another SSH key pair, and copy the '''public key''' to the VM.]: # Verify and confirm that your account on matrix can SSH to your VM as 'student' without being prompted for a password:<source lang='bash'>
[raymond.chan@mtrx-node05pd lab8]$ ssh -p 7200 student@myvmlab.senecacollege.ca
Last login: Fri Jul 3 12:46:19 2020 from mtrx-node05pd.dcm.senecacollege.ca
[raymond.chan@mtrx-node05pd lab8]$
</source>
: # If you got similar result as shown above, you have successfully configured your controller workstation and your VM to use public key authentication.
=INVESTIGATION 2 - Running the fab command in ad-hoc mode =
572
edits

Navigation menu