summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/installation.rst10
-rw-r--r--docs/manpage.rst23
-rw-r--r--docs/usage.rst43
3 files changed, 76 insertions, 0 deletions
diff --git a/docs/installation.rst b/docs/installation.rst
index 5a28f6a..2adddf6 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -5,8 +5,18 @@ Installation
pip install sshuttle
+- Debain package manager::
+ sudo apt install sshuttle
+
- Clone::
git clone https://github.com/sshuttle/sshuttle.git
cd sshuttle
./setup.py install
+
+
+Optionally after installation
+-----------------------------
+
+- Add to sudoers file
+ sshuttle --sudoers
diff --git a/docs/manpage.rst b/docs/manpage.rst
index 5d09c25..34516ed 100644
--- a/docs/manpage.rst
+++ b/docs/manpage.rst
@@ -234,6 +234,29 @@ Options
makes it a lot easier to debug and test the :option:`--auto-hosts`
feature.
+.. option:: --sudoers
+
+ sshuttle will auto generate the proper sudoers.d config file and add it.
+ Once this is completed, sshuttle will exit and tell the user if
+ it succeed or not. Do not call this options with sudo, it may generate a
+ incorrect config file.
+
+.. option:: --sudoers-no-modify
+
+ sshuttle will auto generate the proper sudoers.d config and print it to
+ stdout. The option will not modify the system at all.
+
+.. option:: --sudoers-user
+
+ Set the user name or group with %group_name for passwordless operation.
+ Default is the current user.set ALL for all users. Only works with
+ --sudoers or --sudoers-no-modify option.
+
+--option:: --sudoers-filename
+
+ Set the file name for the sudoers.d file to be added. Default is
+ "sshuttle_auto". Only works with --sudoers.
+
.. option:: --version
Print program version.
diff --git a/docs/usage.rst b/docs/usage.rst
index d782a95..d1960c1 100644
--- a/docs/usage.rst
+++ b/docs/usage.rst
@@ -60,3 +60,46 @@ the data back and forth through ssh.
Fun, right? A poor man's instant VPN, and you don't even have to have
admin access on the server.
+Sudoers File
+------------
+sshuttle can auto-generate the proper sudoers.d file using the current user
+for Linux and OSX. Doing this will allow sshuttle to run without asking for
+the local sudo password and to give users who do not have sudo access
+ability to run sshuttle.
+
+ sshuttle --sudoers
+
+DO NOT run this command with sudo, it will ask for your sudo password when
+it is needed.
+
+A costume user or group can be set with the :
+option:`sshuttle --sudoers --sudoers-username {user_descriptor}` option. Valid
+values for this vary based on how your system is configured. Values such as
+usernames, groups pre-pended with `%` and sudoers user aliases will work. See
+the sudoers manual for more information on valid user specif actions.
+The options must be used with `--sudoers`
+
+ sshuttle --sudoers --sudoers-user mike
+ sshuttle --sudoers --sudoers-user %sudo
+
+The name of the file to be added to sudoers.d can be configured as well. This
+is mostly not necessary but can be useful for giving more than one user
+access to sshuttle. The default is `sshuttle_auto`
+
+ sshuttle --sudoer --sudoers-filename sshuttle_auto_mike
+ sshuttle --sudoer --sudoers-filename sshuttle_auto_tommy
+
+You can also see what configuration will be added to your system without
+modifying anything. This can be helpfull is the auto feature does not work, or
+you want more control. This option also works with `--sudoers-username`.
+`--sudoers-filename` has no effect with this option.
+
+ sshuttle --sudoers-no-modify
+
+This will simply sprint the generated configuration to STDOUT. Example
+
+ 08:40 PM william$ sshuttle --sudoers-no-modify
+
+ Cmnd_Alias SSHUTTLE304 = /usr/bin/env PYTHONPATH=/usr/local/lib/python2.7/dist-packages/sshuttle-0.78.5.dev30+gba5e6b5.d20180909-py2.7.egg /usr/bin/python /usr/local/bin/sshuttle --method auto --firewall
+
+ william ALL=NOPASSWD: SSHUTTLE304