CDA 4150: Computer Architecture,  Fall 2004

Prof. Mark Heinrich

Installing SSH at Home
If you are running FreeBSD at home, simply cd /usr/ports/security/ssh2 and type: make install. Since probably none of you are running FreeBSD at home, this is not that useful.

If you are running Linux at home, ssh is probably installed by default. If not, there is an rpm for ssh that you can fetch. If someone wants to send me instructions for installing ssh on Linux, I will post it here with the proper attribution.

Installing SSH for Windows Machines. There are many possible ssh clients for Windows, including SecureCRT, TeraTerm Pro, and the ssh that comes when you install the Cygwin tools. The latter is what I use. I just go to http://www.cygwin.com/ and install the tool suite. This gives you all the great Unix tools for your Windows box (including an X server!) and also lets you ssh/scp from a command line as if you were on a FreeBSD or Linux box. You can even install sshd so you can ssh to your Windows box if you like. Installing other ssh solutions should be straightforward as well.

To get incoming X traffic to display on your home PC you need to set your display properly on the server. For example under tcsh you would type: setenv DISPLAY myipaddressathome:0. X traffic arrives on port 6000 so if you are behind a firewall you need to open port 6000 and if you are behind a NATD box or residential gateway, you need to redirect port 6000 on the gateway (the public IP) to port 6000 of your private IP address (your PC).

Using the cygwin environment for CDA 4150. When downloading the cygwin tools and you get to teh packages screen, be sure to expand the +Net listing and select openssh and openssl and then expand the +X11 listing and select WindowMaker and xorg-x11-base. (You can choose other packages as you like). Install.

To ssh in from a Windows machine running the cygwin tools:
  • Double-click the Cygwin icon
  • At the command line type: ssh monroe.cs.ucf.edu -l username (NOTE that is a -l (ELL) not a -1 (ONE))
  • Type your password when you get the Password: prompt
  • Cygwin by default runs the bash shell locally on your machine. It will start in the directory you specify with the HOME environment variable. To set an environment variable on XP, Right-click My Computer, choose Advanced, and then Environment Variables at the bottom. In the User Variables section click new, then create a HOME environment variable with the value of your user directory. For example, I created a directory called c:\users\heinrich and made my HOME environment variable be c:\users\heinrich. The process is similar on Windows 2000 machines. The bash shell reads a file called .bashrc in your HOME directory. Here is my .bashrc:
    
    alias vi=vim
    
    alias h=history
    
    alias c=clear
    
    alias more=less
    
    alias sr=source
    
    alias rm='rm -i'
    
    alias ls='ls -F'
    
    alias f=finger
    
    alias ssh='ssh -2'
    
    alias ssh1='ssh -1'
    
    alias traceroute='tracert'
    
    alias gmake='make'
    
    alias wt='echo -n ""'
    
    alias xwinclip='xwinclip >& /dev/null &'
    
    export USER=heinrich
    
    PS1="heinrich@gretzky \!> "
    
    
    gretzky is my machine name and the \! will give you an increasing number for every command you type.

    To start the X server from the cygwin window, simply type startx at the command line. But before you do this you will need a .xinitrc file in your HOME directory. Here is a possible .xinitrc:
    
    xhost +monroe.cs.ucf.edu
    
    wmaker
    
    
    The first line allows monroe to send X windows to your server. The second line starts a window manager. wmaker is my favorite but there are others. Once you start X you can right click on the background and choose XTerm to bring up new X windows. You can ssh to monroe from those windows. Once on monroe you may need to set you DISPLAY environment variable to your home machine. To find out your IP address, type ipconfig in a local window and you will see it. For example, it might say your IP Address is 132.170.107.51. Then on monroe you can type setenv DISPLAY 132.170.107.51:0. Then when you start virsims or other windows they should display on your windows machine in the Cygwin X window. You can test by typing xterm on monroe and seeing if it brings up a window on your home machine. Please see the note above about running X and setting your display if you are behind a home firewall running NATD.

    Unix Resources
    man pages - the key resource on all Unix systems is the installed man pages. The UNIX command man gives help on almost all system programs. In fact man man even gives you help on how to use man. Get used to using man and reading man pages. You can really learn a lot and save yourself some embarassment from asking the TAs a question that is answered by reading the first line of a man page.

    C Resources
    Texts - The classic C text is written by the inventors of the language: Brian Kernighan and Dennis Ritchie. The title is The C Programming Language

    Verilog Resources
    Be sure to read the CDA 4150 On-line Verilog Manual today!

    MIPS Resources
    Here is a MIPS IV instruction manual, suitable for on-line viewing (DON'T PRINT THIS OUT, IT'S 328 PAGES!).