HOWTO: Upgrading Open SSH
If you have not yet upgraded OpenSSL to the latest version it is highly recommended you read my other HOWTO concerning OpenSSL upgrading before using this. Compiling OpenSSH with insecure OpenSSL libaries can leave your OpenSSH installation with major insecurities..http://www.webhostingtalk.com/showth...hreadid=159363
------------------------------------------------------------
Title: Upgrading OpenSSH on Redhat Servers
Revision: 1.0.0
Date: June 28th, 2003
Time: 9:47am CST
Description: Guide for installing and upgrading OpenSSH services on a typical Redhat server.
Difficulty: 5/10
------------------------------------------------------------
Disclaimer:
THIS HOWTO IS PROVIDED BY NULL-ROUTE DOT COM "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NULL-ROUTE DOT COM. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
------------------------------------------------------------
Introduction:
OpenSSH has become the standard for accessing servers today. And maintain its security is a must to keep your server free from intruders. Standard Redhat installations of all versions install OpenSSH but these default installations all also have root exploits for them.
This howto will attempt to guide you in upgrading your current OpenSSH installation to aid in hardening your system.
NOTE: This guide can be considered dangerous as if the directions are not followed exactly and all steps completed you may loose access to your server completely. Use this with caution!
This howto assumes the reader has a general knowledge of Linux and the command line interface for installing applications and has root access to the server. Readers with minimal knowledge of Linux or the processes of compiling and installing software should not attempt this without proper supervision from a system administrator or in a production environment.
Pre-Installation:
We will begin with checking the OpenSSHd version number to see if we are running an older version than current.
Code:
# sshd -v
Code:
root@grep [/]# sshd -v sshd: illegal option -- v sshd version OpenSSH_3.4p1 Usage: sshd [options] <snip>
Code:
# cd /usr/src # wget ftp://ftp.openbsd.org/pub/OpenBSD/Op...3.6.1p2.tar.gz # tar -xvzf openssh-3.6.1p2.tar.gz # cd openssh-3.6.1p2/
Code:
# chkconfig --level 1235 telnet on
Installation and upgrading:
The configure command bellow will enable the pluggable authentication module, PAM and set the configuration path for SSH.
Code:
# ./configure --prefix=/usr --sysconfdir=/etc/ssh --with-pam
Code:
# make # make install
Code:
# adduser sshd -s /sbin/nologin # make install
Code:
# /etc/init.d/sshd restart
Code:
# sshd -v
Code:
root@grep [/]# sshd -v sshd: illegal option -- v sshd version OpenSSH_3.6.1p2 Usage: sshd [options] <snip>
Code:
# chkconfig --level 1235 telnet off
If you have found any glaring typos, or outdated info in this document, please let me know.
------------------------------------------------------------
Next to come... Installing Apache+mod_ssl
