Created
May 16, 2018 19:32
-
-
Save Belval/6906207f96a40325931a662b29d8c363 to your computer and use it in GitHub Desktop.
A script to setup autossh (server side)
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
# Create user tunnel | |
sudo useradd -m tunnel | |
# Enter some easy password (we'll flush it afterwards) | |
sudo passwd tunnel | |
read -p "Run the client script on your client now. When you're done, press [ENTER]." | |
# Delete tunnel user password | |
sudo passwd -d tunnel | |
# Remove access to the shell for this user | |
sudo usermod /sbin/nologin tunnel | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment