Skip to content

Instantly share code, notes, and snippets.

@kaelzhang
Created July 22, 2013 16:23
Show Gist options
  • Save kaelzhang/6055255 to your computer and use it in GitHub Desktop.
Save kaelzhang/6055255 to your computer and use it in GitHub Desktop.
echo "/bin/rbash" >> /etc/shells
cp /bin/bash /bin/rbash
useradd -s /bin/rbash <ssh-user>
passwd <ssh-usr>
echo "export PATH=/home/<ssh-user>" > /home/<ssh-user>/.bash_profile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment