After completing these activities you should be able to:
ssh. The UNIX command shell is similar to the Windows command shell, but not identical: many command names are different, UNIX uses forward slashes (
/) instead of back slashes (
\) to separate elements of path names, and in UNIX there's only one file system hierarchy, rather than many file system hierarchies, each rooted at a different drive letter (e.g. "
C:"). Finally, in this lesson we revisit and expand on the OS's role in managing user accounts and controlling access to the file-system.
ssh, and using a computer remotely
The course server is a UNIX machine (a computer running a UNIX
operating system rather than Windows) named
rona that we all have accounts on.
We can all use
rona at the same time ... but what does "use" mean when you don't have physical access to the computer like your laptops?
It means we can open a shell, execute commands, and
create-view-edit files. The Program
ssh gives us a
shell whose commands execute on
rona, but display to and get
keyboard input from our laptops. So, with
ssh we can use
rona from the comfort of our own laptop.
If your user name is
mxxxx here's how you would
ssh command in a Windows shell on
your laptop to open up a shell whose commands
actually execute on
C:\> ssh firstname.lastname@example.orgSo, the command is
ssh, and the argument is
email@example.com, which is the user name, @ the name of the computer you want to login to. Of course you'll have to give your password before you're allowed on! A new shell window will pop up, and commands entered into this shell window execute on the remote computer (
rona), not on your laptop.
"Open Platform Version 2.1.1" is the operating system installed on your CAC. It has a file-system, runs programs written in "JavaCard" (a subset of the Java programming language), and can run multiple processes at the same time.
rona's OS is called Linux, which is an open-source UNIX operating system. By contrast, Mac OS X, is a closed source UNIX operating system. At any rate, we won't distinguish much between the different flavors of UNIX, and we'll just call them "UNIX". So, why do you need to be familiar with UNIX? Because there are a lot of computers running UNIX out there, and because a lot of security-related tools are for UNIX or based on UNIX.
UNIX commands and the UNIX shell should look pretty familiar,
since you have experience with the Windows shell.
The concepts of commands and arguments are basically the same,
and you still have tab-completion and the up-arrow to retrieve
Ctrl-c kills an executing command, just
like in the Windows shell. However, there are a few important differences that you need to
understand to do much of anything.
/) instead of back slashes (
fooare all different names in UNIX.
copy name.txt myname.txtwould be written in a UNIX shell as
cp name.txt myname.txtwhich means the same thing, just uses the name
copy. Under course resources (the "r" button in the navigation bar) there is a link to a short Windows/UNIX Dictionary that you can refer to.
sshand did the same kind of file system operations from a shell on
ronathat you did the previous class from a Windows shell on your laptop. The basic concepts of process, user names, file ownership and OS control over what processes can access which files are all there in UNIX, just as in Windows. On
rona, where there are hundreds of users, controlling who accesses what is really important!