Error message on start

258 views
Skip to first unread message

Joe

unread,
Mar 22, 2021, 10:07:42 PM3/22/21
to sshuttle
Hi -- 

Curious if anyone might know what is causing this error? I'm running this on a PI 3B+. sshuttle work fine with my laptop and same server. The instance below I used the root user just to see if it was a permissions issue on the server. It did not seen to have an effect. 


$ sudo sshuttle --dns -r root@[server-ip] 0.0.0.0/0 -e 'ssh -g' -v
Starting sshuttle proxy.
firewall manager: Starting firewall with Python version 3.7.3
firewall manager: ready method name nat.
IPv6 enabled: False
UDP enabled: False
DNS enabled: True
User enabled: False
TCP redirector listening on ('127.0.0.1', 12300).
DNS listening on ('127.0.0.1', 12299).
Starting client with Python version 3.7.3
c : connecting to server...
root@[server-ip]'s password: 
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
assembler.py:3: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
Starting server with Python version 3.8.5
 s: latency control setting = True
c : Connected.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "assembler.py", line 38, in <module>
  File "sshuttle.server", line 298, in main
  File "/usr/lib/python3.8/socket.py", line 544, in fromfd
    return socket(family, type, proto, nfd)
  File "/usr/lib/python3.8/socket.py", line 231, in __init__
    _socket.socket.__init__(self, family, type, proto, fileno)
OSError: [Errno 88] Socket operation on non-socket
c : fatal: server died with error code 1



Brian May

unread,
Mar 22, 2021, 11:36:52 PM3/22/21
to sshuttle
Joe <joe.k...@gmail.com> writes:

> Curious if anyone might know what is causing this error? I'm running this
> on a PI 3B+. sshuttle work fine with my laptop and same server. The
> instance below I used the root user just to see if it was a permissions
> issue on the server. It did not seen to have an effect.

What version of sshuttle?
--
Brian May <br...@linuxpenguins.xyz>
https://linuxpenguins.xyz/brian/

Joe

unread,
Mar 23, 2021, 10:03:49 AM3/23/21
to sshuttle
Well. that may be the answer. Looks like the debian repositories are handing out  0.78.5... 

$ sshuttle --version
0.78.5

I'll see if pip can do an update rather than use apt. 

Joe

unread,
Mar 27, 2021, 7:19:00 PM3/27/21
to sshuttle
I finally had some time to get back to this. I installed sshuttle from the git repository on the Pi3B+ running PiOS (Raspian)... I initially tested it out on my Ubuntu 20.04 laptop and although it took a bit of coaxing, but I got it working with version 1.0.5 using the git repository. When I did the same on the Pi3B+ here is the result I received:

cd sshuttle
./setup.py install

When I tried ./setup.py install I got the following. Additionally I tried sudo ./setup.py install and you can see the result below... 

pi@raspberrypi-hotspot:~/sshuttle $ ./setup.py install
Traceback (most recent call last):
  File "./setup.py", line 74, in <module>
    keywords="ssh vpn",
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 724, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 790, in fetch_build_egg
    cmd.ensure_finalized()
  File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized
    self.finalize_options()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 352, in finalize_options
    self.check_site_dir()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 497, in check_site_dir
    self.cant_write_to_target()
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 560, in cant_write_to_target
    raise DistutilsError(msg)
distutils.errors.DistutilsError: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: './.eggs/test-easy-install-5721.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    ./.eggs

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:


Please make the appropriate changes for your system and try again.

pi@raspberrypi-hotspot:~/sshuttle $ sudo ./setup.py install
/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/src
<pkg_resources.WorkingSet object at 0x75cb84d0>
Traceback (most recent call last):
  File "./setup.py", line 74, in <module>
    keywords="ssh vpn",
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 144, in setup
    _install_setup_requires(attrs)
  File "/usr/lib/python2.7/dist-packages/setuptools/__init__.py", line 139, in _install_setup_requires
    dist.fetch_build_eggs(dist.setup_requires)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 724, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 782, in resolve
    replace_conflicting=replace_conflicting
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1065, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 1077, in obtain
    return installer(requirement)
  File "/usr/lib/python2.7/dist-packages/setuptools/dist.py", line 791, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 704, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 730, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 915, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1183, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/command/easy_install.py", line 1169, in run_setup
    run_setup(setup_script, args)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 253, in run_setup
    raise
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 166, in save_modules
    saved_exc.resume()
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 141, in resume
    six.reraise(type, exc, self._tb)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/usr/lib/python2.7/dist-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/setup.py", line 52, in <module>
    "Programming Language :: Python :: 3.6",
  File "/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/setup.py", line 29, in scm_config
    setup(
  File "/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/src/setuptools_scm/__init__.py", line 8, in <module>
  File "/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/src/setuptools_scm/config.py", line 6, in <module>
  File "/tmp/easy_install-kiJ9J4/setuptools_scm-6.0.1/src/setuptools_scm/utils.py", line 41
    print(*k)
          ^
SyntaxError: invalid syntax





Joe

unread,
Mar 27, 2021, 7:46:45 PM3/27/21
to sshuttle
I ended up trying the following and it looks like success. Looks like version 1.0.6.dev30+g51a1078 is what git is handing out. I'll attempt to set up the tunnel with the server a bit later:   :)

pi@raspberrypi-hotspot:~/sshuttle $ sudo python3 setup.py install
running install
running bdist_egg
running egg_info
creating sshuttle.egg-info
writing sshuttle.egg-info/PKG-INFO
writing dependency_links to sshuttle.egg-info/dependency_links.txt
writing entry points to sshuttle.egg-info/entry_points.txt
writing requirements to sshuttle.egg-info/requires.txt
writing top-level names to sshuttle.egg-info/top_level.txt
writing manifest file 'sshuttle.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'docs/_build'
writing manifest file 'sshuttle.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/sshuttle
copying sshuttle/client.py -> build/lib/sshuttle
copying sshuttle/__main__.py -> build/lib/sshuttle
copying sshuttle/server.py -> build/lib/sshuttle
copying sshuttle/version.py -> build/lib/sshuttle
copying sshuttle/sdnotify.py -> build/lib/sshuttle
copying sshuttle/sudoers.py -> build/lib/sshuttle
copying sshuttle/assembler.py -> build/lib/sshuttle
copying sshuttle/ssh.py -> build/lib/sshuttle
copying sshuttle/stresstest.py -> build/lib/sshuttle
copying sshuttle/helpers.py -> build/lib/sshuttle
copying sshuttle/__init__.py -> build/lib/sshuttle
copying sshuttle/linux.py -> build/lib/sshuttle
copying sshuttle/options.py -> build/lib/sshuttle
copying sshuttle/ssnet.py -> build/lib/sshuttle
copying sshuttle/hostwatch.py -> build/lib/sshuttle
copying sshuttle/firewall.py -> build/lib/sshuttle
copying sshuttle/cmdline.py -> build/lib/sshuttle
copying sshuttle/ssyslog.py -> build/lib/sshuttle
creating build/lib/sshuttle/methods
copying sshuttle/methods/pf.py -> build/lib/sshuttle/methods
copying sshuttle/methods/__init__.py -> build/lib/sshuttle/methods
copying sshuttle/methods/nft.py -> build/lib/sshuttle/methods
copying sshuttle/methods/ipfw.py -> build/lib/sshuttle/methods
copying sshuttle/methods/tproxy.py -> build/lib/sshuttle/methods
copying sshuttle/methods/nat.py -> build/lib/sshuttle/methods
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/client.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/__main__.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/server.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/version.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/sdnotify.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/sudoers.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/assembler.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/ssh.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/stresstest.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/helpers.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/__init__.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/linux.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/options.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/ssnet.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/hostwatch.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/firewall.py -> build/bdist.linux-armv7l/egg/sshuttle
copying build/lib/sshuttle/cmdline.py -> build/bdist.linux-armv7l/egg/sshuttle
creating build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/pf.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/__init__.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/nft.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/ipfw.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/tproxy.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/methods/nat.py -> build/bdist.linux-armv7l/egg/sshuttle/methods
copying build/lib/sshuttle/ssyslog.py -> build/bdist.linux-armv7l/egg/sshuttle
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/client.py to client.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/__main__.py to __main__.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/server.py to server.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/version.py to version.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/sdnotify.py to sdnotify.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/sudoers.py to sudoers.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/assembler.py to assembler.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/ssh.py to ssh.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/stresstest.py to stresstest.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/helpers.py to helpers.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/linux.py to linux.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/options.py to options.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/ssnet.py to ssnet.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/hostwatch.py to hostwatch.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/firewall.py to firewall.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/cmdline.py to cmdline.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/pf.py to pf.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/__init__.py to __init__.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/nft.py to nft.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/ipfw.py to ipfw.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/tproxy.py to tproxy.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/methods/nat.py to nat.cpython-37.pyc
byte-compiling build/bdist.linux-armv7l/egg/sshuttle/ssyslog.py to ssyslog.cpython-37.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
installing scripts to build/bdist.linux-armv7l/egg/EGG-INFO/scripts
running install_scripts
running build_scripts
creating build/scripts-3.7
copying bin/sudoers-add -> build/scripts-3.7
creating build/bdist.linux-armv7l/egg/EGG-INFO/scripts
copying build/scripts-3.7/sudoers-add -> build/bdist.linux-armv7l/egg/EGG-INFO/scripts
changing mode of build/bdist.linux-armv7l/egg/EGG-INFO/scripts/sudoers-add to 755
copying sshuttle.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying sshuttle.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying sshuttle.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying sshuttle.egg-info/entry_points.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying sshuttle.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying sshuttle.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
sshuttle.__pycache__.client.cpython-37: module references __file__
sshuttle.__pycache__.sudoers.cpython-37: module references __file__
creating dist
creating 'dist/sshuttle-1.0.6.dev30+g51a1078-py3.7.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing sshuttle-1.0.6.dev30+g51a1078-py3.7.egg
creating /usr/local/lib/python3.7/dist-packages/sshuttle-1.0.6.dev30+g51a1078-py3.7.egg
Extracting sshuttle-1.0.6.dev30+g51a1078-py3.7.egg to /usr/local/lib/python3.7/dist-packages
Adding sshuttle 1.0.6.dev30+g51a1078 to easy-install.pth file
Installing sudoers-add script to /usr/local/bin
Installing sshuttle script to /usr/local/bin

Installed /usr/local/lib/python3.7/dist-packages/sshuttle-1.0.6.dev30+g51a1078-py3.7.egg
Processing dependencies for sshuttle==1.0.6.dev30+g51a1078
Searching for psutil==5.5.1
Best match: psutil 5.5.1
Adding psutil 5.5.1 to easy-install.pth file

Using /usr/lib/python3/dist-packages
Finished processing dependencies for sshuttle==1.0.6.dev30+g51a1078


Reply all
Reply to author
Forward
0 new messages