Open main menu

CDOT Wiki β

Changes

OPS235 Lab 7 - CentOS6

1 byte removed, 19:06, 12 January 2014
Investigation 2: How do you establish an ssh connection.
=== Investigation 2: How do you establish an ssh connection. ===
{{Admon/note | Use your fedora2 centos2 VM | Complete this investigation on your fedora2 centos2 VM.}}
# Establish an ssh connection to your fedora3 centos3 VM using the command:<br /><code>ssh ops235@fedora3centos3</code><br />(Where 'ops235' is the account on fedora3 centos3 and 'fedora3centos3' is the hostname of the fedora3 centos3 VM.)
# You should receive a message similar to the following:
<pre>
The authenticity of host 'fedora3 centos3 (192.168.235.13)' can't be established.
RSA key fingerprint is 53:b4:ad:c8:51:17:99:4b:c9:08:ac:c1:b6:05:71:9b.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'fedora3centos3' (RSA) to the list of known hosts.
</pre>
{{Admon/note |Storing Fingerprints | When a user connects to a host using ssh, the host sends a fingerprint or digital signature to the client to establish its identity. The first time a connection is established the identity must be stored for subsequent connections. The fingerprints are stored separately for each user in a file called <code>~/.ssh/known_hosts</code> . <br /><br />From now on when you connect to that host the client will compare the received fingerprint against the list of known hosts before connecting. If the fingerprint does not match it could indicate somebody had setup a system to impersonate the computer you wish to connect to and you would receive a message like this}}
{{Admon/note |POSSIBLE DNS SPOOFING DETECTED | If you receive a message like the one displayed above, you should investigate why it is happening as it could indicate a serious security issue, or it could just mean that something on the host has changed, i.e. the OS was reinstalled.}}
<ol><li value="4">When prompted enter your password for your ops235 account on fedora3centos3.</li>
<li>Establish an ssh connection using your learn account from fedora3 to fedora2.</li></ol>
{{Admon/note |Proof of Established SSH Connection | When you have both ssh connections established between fedora2 and fedora3 check your network connections using the netstat command. You should now see at least 2 TCP connections with a state of ESTABLISHED. One connection represents the connection from fedora2 to fedora3 and the other represents the connection from fedora3 centos3 to fedora2centos2. You should also see that you still have ssh listening to TCP port 22. Notice that the client side of each connection uses a random port number in the upper ranges. This common behaviour for client side applications.}}
<ol><li value="6">Logout of your ssh connection by typing <code>exit</code>.
<li>Check the state of the connection after logging out. Wait a few minutes and then check again. Record your observations.</li>
<li>Make certain to exit all connections, and that your shell is located in your <u>Fedora2centos3</u> server. You can verify this by entering the command: <code>hostname</code>
<li>Use the Internet to search for "TCP 3 way handshake" to see how TCP connections are established and closed.</li></ol>
{{Admon/tip | Methods of Authenticating User Identity | In this part of the lab you established an ssh connection to another host using a password to establish your identity. But passwords are not the only or even the best way of authenticating your identity. We can also use Public/Private key encryption. We will be looking at Public Key Authentication in the next investigation}}
'''Answer the Investigation 2 observations / questions in your lab log book.'''
 
=== Investigation 3: How do you establish an ssh connection using Public Key Authentication. ===