Created
December 15, 2017 05:39
-
-
Save CarlOlson/4dde90c9d415c5a0d3bd964fab3e7f00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p notrust/.ssh | |
touch notrust/.ssh/authorized_users | |
useradd -d notrust notrust | |
chown -R notrust:notrust notrust | |
chown root:root notrust | |
chmod 700 notrust/.ssh | |
chmod 644 notrust/.ssh/authorized_users | |
echo 'AllowUsers ... notrust' > /etc/ssh/sshd_config | |
echo 'command="echo hello",restrict ssh-rsa ...' > notrust/.ssh/authorized_users |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment