Skip to content

Instantly share code, notes, and snippets.

View JT501's full-sized avatar
๐Ÿš€

Johnny Tsoi JT501

๐Ÿš€
View GitHub Profile
@JT501
JT501 / jail_sftp_user.md
Last active November 8, 2024 08:58
Jail SFTP user into their directories

Jail SFTP user into their directories

  1. Create user group sftpgroup

  2. Add user into sftpgroup

  3. Modify etc/ssh/sshd_config :

#Subsystem sftp /usr/lib/openssh/sftp-server
@JT501
JT501 / webmin_oath_2FA.md
Last active November 17, 2019 06:16
Webmin: Install Authen::OATH for 2FA

Webmin: Install Authen::OATH for 2FA

For people having trouble running the CPAN or MCPAN commands via command line or through the Perl Module manager in Webmin (meaning it fails to install via CPAN so it tried to install via source), you need to first install CPAN:

yum -y install perl-CPAN

Update CPAN if needed.

And the approximate sequence of commands thereafter: