Changes

Jump to: navigation, search

OPS335 Lab 1 draft

710 bytes added, 16:38, 10 January 2016
SSH Keys
Using the magic of public key cryptography you can SSH to a linux machine without using a password. This topic is crucial - not only for this course but in the industry, SSH keys are used everywhere that linux servers are used.
Here's a great diagram from [http://sebastien.saunier.me/blog/2015/05/10/github-public-key-authentication.html Sébastien Saunier's blog] that's a great simple illustration of how SSH key authentication works:
[[Image:ssh_connection_explained.png|800px]]
 
It's not a perfect diagram (e.g. you can't decrypt a message using a public key but you can use a public key to verify a signature) but it helps see all the parts of ssh key authentication in one place.
 
=== Public/Private key pair ===
 
This needs to be generated on and used on your '''client''' (the user/machine you're connecting '''from'''). The private key is the equivalent of a password, that's why it's private. And a private key is used by one user, that's why it's stored in a user's ~/.ssh/ directory.
 
You generate a new keypair with this command:
 
<source lang="bash">ssh-keygen -t rsa</source>
 
You'll end up with ~/.ssh/id_rsa and ~/.ss/id_rsa.pub - now you have a key pair you can use for authentication.
== rsync & cron ==

Navigation menu