Created
August 7, 2015 16:28
-
-
Save IQAndreas/2f5ee3ca63527b03184d to your computer and use it in GitHub Desktop.
See [_SuperUser: Block Access from outside of LAN_](http://superuser.com/q/952192/114760)
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
# This is the setting that is ONLY available if you are SSHing from the LAN (allow the listed users) | |
Match Address 192.168.0.* | |
AllowUsers git adam bob cliff dave | |
# This displays a message if the user NOT 'git' AND connecting from outside of the LAN | |
# Note, the extra *, is due to this bug: http://superuser.com/q/952235/114760 | |
Match User *,!git Address *,!192.168.0.* | |
ForceCommand /bin/echo "Sorry, you are only allowed to connect to this server via git." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment