Changes

stoney backup: Server set-up

467 bytes added, 08:03, 25 August 2013
/* OpenSSH */
</source>
Make the Set following options are set:
<source lang="bash">
PubkeyAuthentication yes
</source>
Make sure, that <code>Subsystem sftp internal-sftp</code> is the last line in the configuration file.
Make sure, that <source lang="bash">Subsystem sftp internal-sftp</source> is the last line in the configuration file. We want to reduce the numbers of chroot environment environments in one folder. As the <code>ChrootDirectory</code> configuration option only allows <code>%h</code> (home directory of the user) and <code>%u</code> (username of the user), we need to create a thousand sub folders, which will hold the chroot environments necessary matching rules in the form of:
<source lang="bash">
Match User *000 ChrootDirectory /var/backup/000/%uMatchMatch User *001 ChrootDirectory /var/backup/001/%uMatch...Match User *999 ChrootDirectory /var/backup/999/%uMatch
</source>
ExecuteThe creation of the matching rules is done by executing the following bash commands:
<source lang="bash">
FILE=/etc/ssh/sshd_config;
printf "Match\n" >> ${FILE}; \
done
</source>
 
Don't forget to restart the OpenSSH daemon:
<source lang="bash">
/etc/init.d/sshd restart
</source>
SLB, editor, reviewer
3,368
edits