Changes

Jump to: navigation, search

OPS335 Lab 1

171 bytes added, 15:19, 13 January 2016
no edit summary
After performing lab7 in OPS235, you should have a basic understanding of ssh and public/private key cryptography to create secure connections between servers.
The public key can be "shared" with other server accounts, etc and used in conjunction with your private key in order to help encrypt/de-crypt data.
 
 
What you may not know is that by using a "trick" (the magic of public key cryptography), you can SSH to a Linux machine without using a password!
Learning to perform this trick is <u>'''essential'''</u> in this course and in the industry in general. SSH keys are used everywhere that Linux servers are used.
The diagram displayed to the right is shared from [http://sebastien.saunier.me/blog/2015/05/10/github-public-key-authentication.html Sébastien Saunier's blog].
It demonstrates how SSH key authentication works. It's not a complete diagram, but it helps see all the parts of ssh key authentication in one place.
 
==== Public/Private key pair ====
<source lang="bash">ssh-keygen -t rsa</source>
When issuing this commancommand, you will end up with the files: '''~/.ssh/id_rsa''' and '''~/.ss/id_rsa.pub''' (private and public keys)  ==== Sharing your Public key on a Remote server ==== So far, this is a general repeat of OPS235 lab7...  What you may '''<u>not</u>''' know is that by using a '''"trick"''' (the ''magic'' of public key cryptography), you can SSH to a Linux machine without using a password!Learning to perform this trick is <u>'''essential'''</u> in this course and in the industry in general. SSH keys are used everywhere that Linux servers are used.
==== Public 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. There you would need to transfer your public key on to the remote server ====.
If you have the private key - you can prove to someone who has your public key that you're really the owner of that public key. That's how ssh key authentication works, so the server needs to have you user's public key. You can copy it over manually and append the contents of your ~/.ssh/id_rsa.pub from the client to ~/.ssh/authorized_keys on the server, or you can issue this command on the client to do all that for you:
You can do this two ways:<ul><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>Issue the command:<br><source lang="bash">ssh-copy-id -i ~/.ssh/id_rsa.pub username@server</source><br></li></ul>
13,420
edits

Navigation menu