Computer
Networking
and
Practical
Security

Fall 2006
course
navigation

Oct20notes

Cryptography from a Computer Perspective

A quick intro:
Tools:
First we generate a key (leave file and passphrase empty by default):
mdhcp125:~ gabe$ ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/Users/gabe/.ssh/id_rsa): /Users/gabe/.ssh/id_rsa already exists. Overwrite (y/n)? y Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/gabe/.ssh/id_rsa. Your public key has been saved in /Users/gabe/.ssh/id_rsa.pub. The key fingerprint is: b7:b3:f4:5d:11:9a:f8:80:a3:d5:8b:3c:ad:90:08:75 gabe@mdhcp125.marlboro.edu
Next, copy your public key over to host you wish to connect to (in this case, cs):
mdhcp125:~ gabe$ scp .ssh/id_rsa.pub glein@cs: glein@cs's password: id_rsa.pub 100% 408 0.4KB/s 00:00 mdhcp125:~ gabe$ ssh glein@cs glein@cs's password: Linux cs 2.6.12-10-686-smp #1 SMP Fri Sep 15 16:47:57 UTC 2006 i686 GNU/Linux Welcome to cs.marlboro.edu As of Aug 30 2006 we're running Ubuntu on an Athlon 64 X2. Go figure. Last login: Fri Oct 13 11:47:22 2006 from mdhcp11.marlboro.edu
If you don't have any other public keys stored on the host yet, you can rename the public key "authorized_keys" and move it to the .ssh directory. Otherwise you can use ">>" to append the key to the file.
glein@cs:~$ mv id_rsa.pub .ssh/authorized_keys
http://cs.marlboro.edu/ courses/ fall2006/networking/ Oct20notes
last modified Friday October 20 2006 10:21 am EDT