13,420
edits
Changes
no edit summary
</pre>
{{Admon/note | | 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> .}}
{{Admon/note | | 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:}}
<pre>
{{Admon/note | | If you receive a message like this 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="5">* When prompted enter your password for your ops235 account on fedora3.</li>* <li>Establish an ssh connection using your learn account from fedora3 to fedora2.</li></ol>
{{Admon/note | | 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 to fedora2. 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="7">* 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>Use the Internet to search for "TCP 3 way handshake" to see how TCP connections are established and closed.</li>
{{Admon/tip | Tip: | 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.}}
<ol><li value="10">* Answer the Investigation 2 question in your lab log book.</li></ol>
=== Investigation 3: How do you establish an ssh connection using Public Key Authentication. ===