Changes

Jump to: navigation, search

OPS245 Lab 7

114 bytes removed, 20:35, 8 April 2021
m
Part 1: Generating Private and Public Keys (Public Key Infrastructure)
# Switch to your '''c7host''' VM.
# Create a file in your current directory of your c7host machine with some text in it called: '''myfile.txt'''
# Ensure you've successfully connected to the VPN required for Matrix (https://inside.senecacollege.ca/its/services/vpn/studentvpn.html). Then issue Issue the following command (using your Matrix login id):<br><b><code><span style="color:#3366CC;font-size:1.2em;">scp &nbsp; myfile.txt &nbsp; yourmatrixid@matrix.senecac.onsenecacollege.ca:/home/yourmatrixid</span></code></b><br>(followed by your Matrix password)<br>What did this command do?# Issue the following single command (arguments are separated by a space - use your Matrix login id):<br><b><code><span style="color:#3366CC;font-size:1.2em;">ssh &nbsp; yourmatrixid@matrix.senecac.onsenecacollege.ca &nbsp; ls /home/yourmatrixid/myfile.txt</span></code></b><br>(followed by your Matrix password)<br>What did this command do?<br>Issue the following Linux command:<br><b><code><span style="color:#3366CC;font-size:1.2em;">ssh &nbsp; yourmatrixid@matrix.senecac.onsenecacollege.ca &nbsp; cat /home/yourmatrixid/myfile.txt</span></code></b><br>How do these commands differ from using issuing the ssh command without the ls or cat command? How is this useful?<br><br>The client ssh application contains the utlities: '''ssh''', '''scp''' and '''sftp''' (learned in ULI101) to connect to remote Linux servers in order to issue commands or transfer files between Linux servers. You can install the SSH service on your Linux server, although this has already been performed upon installation. We will now confirm that the ssh service is running on all of your VMs.<br><br>
# OpenSSH should have been installed by default. Let's confirm this by issuing the command:<br /> <b><code><span style="color:#3366CC;font-size:1.2em;">rpm -qa | grep ssh</span></code></b>
# You should see a number of packages installed including <b>openssh-clients</b> and <b>openssh-server</b>
<pre style="font-family:monospace;background-color:white;border-style:none;padding-left:50px;">
Generating public/private rsa key pair.
Enter file in which to save the key (/home/ops245yoursenecaid/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter passphrase again:
Your public key has been saved in /home/ops245yoursenecaid/.ssh/id_rsa.pub.
The key fingerprint is:
ef:de:31:67:f7:15:a4:43:39:15:5d:78:1b:e8:97:74 ops245yoursenecaid@centos3centos2
The key's randomart image is:
+--[ RSA 2048]----+
572
edits

Navigation menu