Put Your OpenSSH Server in SSHjail | Linux Today

Put Your OpenSSH Server in SSHjail

Written By
Web Webster
Web Webster
Apr 25, 2007

“Jailing is a mechanism to virtually change a system’s root
directory. By employing this method, administrators can isolate
services so that they cannot access the real filesystem structure.
You should run unsecured and sensitive network services in a chroot
jail, because if a hacker can break into a vulnerable service he
could exploit your whole system. If a service is jailed, the
intruder will be able to see only what you want him to see–that
is, nothing useful. Some of the most frequent targets of attack,
which therefore should be jailed, are BIND, Apache, FTP, and SSH.
SSHjail is a patch for the OpenSSH daemon. It modifies two OpenSSH
files (session.c and version.h) and allows you to jail your SSH
service without any need for SSH reconfiguration.

“To use SSHjail you need the OpenSSH source package, the SSHjail
patch, and some development tools like patch and make. You also
need the OpenSSL and Zlib development libraries installed in order
to compile the patched SSH daemon. I’ve successfully installed
SSHjail on CentOS 4.2 and Fedora 6 distribution; the instructions
may be a bit different for your Linux flavor, but you’ll get the
idea…”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.