Home > Enterprise Linux Tips > > Compiling OpenSSH on Ubuntu 7.04 Feisty Fawn Server
Enterprise Linux Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 


Compiling OpenSSH on Ubuntu 7.04 Feisty Fawn Server


Andrew Kutz
05.29.2007
Rating: --- (out of 5)


Enterprise IT tips and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


SSH is the standard for connecting to remote servers -- without it we would all be taken back in time to the days of telnet and serial cables. However, the SSH version that ships with Ubuntu server does not include all of the latest functionality of the production release of the OpenSSH software. To that end, this article will explain how to compile and install the newest release of some of the most important software for Linux on the latest version of Ubuntu server.

Installing the OpenSSH client and server on Ubuntu is as easy as typing "sudo apt-get install openssh" at a terminal prompt. However, this will install Portable OpenSSH version 4.3p2[-8ubuntu1]. Unfortunately for users, this version of Portable OpenSSH does not include the "Match" functionality added to the SSH server in version 4.4p1, that "allows some configuration options to be selectively overridden if specific criteria (based on user, group, hostname and/or address) are met."

This article will detail how to compile and configure the latest version of Portable OpenSSH (4.6p1 at the time of this writing) on an Ubuntu 7.04 Feisty Fawn Server system in order to obtain the OpenSSH server's latest features.

A few notes before we begin:

  • This article assumes that Ubuntu 7.04 Feisty Fawn Server has been installed without configuring the system as a LAMP or DNS server.
  • The version of OpenSSH that is available from the Ubuntu Feisty Fawn repositories will be referred to as the Ubuntu repository version.
  • The version of OpenSSH downloaded from openssh.org will be referred to as the new version of OpenSSH.

Installing OpenSSH

If it has not already installed, then install the Ubuntu repository version of OpenSSH. This will put some configuration files into place that can be copied later. Type:

Change directories to /usr/local/src

Download Portable OpenSSH 4.6p1 ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
Ubuntu  (SearchEnterpriseLinux.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


from the mirrors by typing:

Use this filepath: http://mirror.mcs.anl.gov/openssh/portable/openssh-4.6p1.tar.gz

Now, decompress the tarball with:

Remove the tarball.

Change the directories to /usr/local/src/openssh-4.6p1:

Install packages necessary to compile the new version of OpenSSH. Some of these may already be installed on the target system, and if this is the case, the package management tool, apt-get, will simply ignore them. Type:

Configuring OpenSSH with Ubuntu

Configure the new version of OpenSSH with the following options:

  • -with-pid-dir=/opt/openssh-4.6p1/var/run
  • -with-privsep-path=/opt/openssh-4.6p1/var/empty --with-pam
  • -with-md5-passwords --with-tcp-wrappers --with-kerberos5

    Build the new version of OpenSSH with:

    Install the new version OpenSSH:

    Create the directory /opt/openssh-4.6p1/var/run:

    Rename the existing Ubuntu repository OpenSSH configuration directory.

    Create a symlink that links the /etc/ssh to /opt/openssh-4.6p1/etc:

    Rename the ssh and sshd configuration files in the new OpenSSH installation.

    Copy the original ssh and sshd configuration files into the new OpenSSH installation directory.

    Edit the next to last line in /etc/ssh/sshd_config so that it points to the correct sftp-server binary. Therefore Subsystem sftp /usr/lib/openssh/sftp-server becomes Subsystem sftp /opt/openssh-4.6p1/libexec/sftp-server. Change directories to /etc/init.d.

    Rename the file ssh.

    Download the file "ssh" from www.lostcreations.com. This new file is edited so that all hardcoded references to the Ubuntu repository version of OpenSSH are replaced with variables and those variables are set to the new version of OpenSSH.

    sudo wget

    Change directories to /etc

    Rename the file manpath.config

    Download the file "manpath.config" from www.lostcreations.com. This new file is edited so that the new version of OpenSSH will be placed in the path for man pages.

    sudo wget

    If you are logged into the target system via a SSH session then the next step could disconnect you. To avoid disconnection, install a package called "screen," otherwise just execute the commands in the file restart_ssh that is created in a few steps.

    Now change directories to /usr/local/bin:

    Create a file called restart_ssh and put the following text into it:

    Make the file executable

    Execute the file with screen.

    That's it! If you have any questions feel free to shoot me an email!

    Rate this Tip
    To rate tips, you must be a member of SearchEnterpriseLinux.com.
    Register now to start rating these tips. Log in if you are already a member.




    DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



  • Enterprise Linux Web Server & Application Server
    HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersIT Downloads
    About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
    SEARCH 
    TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

    TechTarget Corporate Web Site  |  Media Kits  |  Site Map




    All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
      TechTarget - The IT Media ROI Experts