BowerStudios.com

  • My Lab
  • Family
  • Friends
  • Professional
  • About
Home

Howto Setup a chroot jail for ssh / scp / sftp with Linux - Ubuntu 10.10

daniel —Wed, 07/20/2011 - 11:06am

  • Security
  • Linux

There is a very nice script for automating the setup of a chroot jail for ssh / scp / sftp on fuschlberger.net

Just run the script with no args to get find out its parameters.

I had to make some modifications to get it to run on Ubuntu Server though. Specifically, change these lines (at ~ line 406):
TMPFILE1=`mktemp` &> /dev/null || TMPFILE1="${HOME}/ldlist"; if [ -x ${TMPFILE1} ]; then mv ${TMPFILE1} ${TMPFILE1}.bak ; fi
TMPFILE2=`mktemp` &> /dev/null || TMPFILE2="${HOME}/ldlist2"; if [ -x ${TMPFILE2} ]; then mv ${TMPFILE2} ${TMPFILE2}.bak ; fi

to these lines:
#TMPFILE1=`mktemp` &> /dev/null ||
TMPFILE1="${HOME}/ldlist"; if [ -x ${TMPFILE1} ]; then mv ${TMPFILE1} ${TMPFILE1}.bak ; fi
#TMPFILE2=`mktemp` &> /dev/null ||
TMPFILE2="${HOME}/ldlist2"; if [ -x ${TMPFILE2} ]; then mv ${TMPFILE2} ${TMPFILE2}.bak ; fi

  • Log in to post comments

Navigation

  • Search
  • Recent content
  • Contact Me
  • Mail
  • Pass Hasher
  • Bower Studios Admin

Quotes

daniel —Fri, 08/25/2006 - 10:16pm

The only really important time in our lives is the time we waste with those we love.

—

Antoine de St. Exupery

  • Log in to post comments
  • daniel's quotes

Popular content

Last viewed:

  • Design Sparks
  • Programming for Kids
  • SpringOne 2GX highlights
  • Java 5 on OpenBSD
  • Speaking UNIX: The best-kept secrets of UNIX power users - developerWorks

Copyright 2022 Daniel Bower
  • My Lab
  • Family
  • Friends
  • Professional
  • About