Created
April 12, 2012 09:13
-
-
Save guileen/2365771 to your computer and use it in GitHub Desktop.
create user for ssh no shell
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
# ensure you have nologin | |
# | |
# less /etc/shells | |
# which nologin | |
# /usr/sbin/nologin | |
# echo `which nologin` >> /etc/shells | |
useradd -m -s /usr/sbin/nologin public | |
# login without password | |
# http://www.linuxproblem.org/art_9.html | |
# ssh-keygen -t rsa | |
# cat .ssh/id_rsa.pub | ssh public@host 'cat >> .ssh/authorized_keys' | |
# ssh -CD 8888 -N public@host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment