Computing Topics --> Security Topics --> All Security Topics Pages --> Installing OpenSSH Server and Client -->

Installing OpenSSH Server and Client

OpenSSH is a Secure Shell transferring program that will allow you to use encrypted information transfer between your computer and other unix computers.

NOTE: Before you can do this install, you will need to have OpenSSL installed on your computer. If you do not already have this, please click here

OpenSSH readme file

  1. You will first need to download the SSH Source Code. You can do that by clicking here

  2. When the download has completed, you can now move the source code to a system level directory. To do this, you need to open up an X-term (this can be launched under most window managers by clicking on the icon that looks like a monitor on the tool bar) , and then change to the directory that you just downloaded the source code package to.



  3. You will first need to be running as root in order to write to a system level directory. To do this, type:

    su  (now type your root-level password)



  4. Now that you are running as root, you can move the source code by typing at the command prompt:

    mv  ./openssh-2.9p2.tar.gz  /usr/local/src/.



  5. Now, change directory to the source directory by typing:

    cd  /usr/local/src



  6. You now need to uncompress and extract the source code files by typing:

    tar  zxf  openssh-2.9p2.tar.gz



  7. Now that the files have been extracted, if you want to conserve disk space, you may delete the package of source code by typing:

    rm  openssh-2.9p2.tar.gz



  8. Once the files have extracted, you need to change directory into the source code directory by typing:

    cd  openssh-2.9p2/



  9. To begin the installation, you first need to run the configure script. This script will gather information about your computer and its configuration that it will need during the compilation process. You run this script by typing:

    ./configure  --with-tcp-wrappers  --with-xauth=/usr/X11R6/bin/xauth

    (Note: The next few steps can take several minutes to complete)





  10. You are now ready to compile the program for your computer. To do this, simply type:

    make



  11. Once you have compiled the program, you will need to make it a system level install. Since you are running as root, you can do the system level installation by typing:

    make  install



  12. It is a good idea at this point to remove the object files that your computer used to compile SSH. This can be done by typing:

    make  clean



  13. Your system is now setup to use the Secure Shell Client. You will need to do a few more steps to configure your computer to allow SSH connections to come into it. The easiest way to do this is to edit a script that runs at startup to have it automatically start the Secure Shell Server. To edit this file, type:

    pico  /etc/rc.d/rc.local



  14. After the lines that begin with a "#", on a line by itself, you need to type:

    /usr/local/sbin/sshd

    Now hit control-x, then type Y to save this file.

  15. Linux uses an authentication module called PAM, which stands for Pluggable Authentication Module. In order for PAM to recognize the SSHD program and allow you to log into your machine, you will need to copy the module that comes with OpenSSH to the appropriate directory. This can be done by typing:

    cp  /usr/local/src/openssh-2.9p2/contrib/redhat/sshd.pam  /etc/pam.d/sshd



  16. In order to enable your computer to do forwarding of graphical applications over SSH connections, you will need to edit the file:

    /usr/local/etc/sshd_config

    On the line that states:

    X11Forwarding no

    You will need to change the no to yes, and then exit and save the file.

  17. The next time you reboot your computer, the Secure Shell server and clients will be automatically available for your use. If you wish to not reboot your computer at this time, you can also start the Secure Shell Server manually by typing at the command prompt:

    /usr/local/sbin/sshd



How do I:
How are we doing? Comments on this page?
Office of Information Technology
Office of Information Technology Help Desk Web Site University of Maryland Web Site Office of Information Technology Web Site