[SOLVED] Установка sshuttle

Добро пожаловать!

Moderator: Blaze

Post Reply
oermolaev
White ninja
White ninja
Posts: 22
Joined: 08 Jul 2017, 20:57
Distribution: porteus
Location: Russia

[SOLVED] Установка sshuttle

Post#1 by oermolaev » 13 Aug 2017, 19:51

Создал и активировал модули:
sshuttle-0.78.1-i586-1_slonly.xzm
python-2.7.11-i586-bundle.xzm
Запуск программы sshuttle завершается с ошибкой:

Code: Select all

$ sshuttle --help
Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
Пятая строка модуля:

Code: Select all

$ head -n5 /usr/bin/sshuttle 
#!/usr/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'sshuttle==0.78.1','console_scripts','sshuttle'
__requires__ = 'sshuttle==0.78.1'
import sys
from pkg_resources import load_entry_point
Помогите кто чем может...
Last edited by oermolaev on 16 Aug 2017, 07:58, edited 3 times in total.

User avatar
Blaze
Moderator
Moderator
Posts: 1330
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Установка sshuttle. Не получается.

Post#2 by Blaze » 14 Aug 2017, 08:51

У меня запустился без проблем

Code: Select all

guest@porteus:~$ python /usr/bin/sshuttle
usage: sshuttle [-l [ip:]port] [-r [user@]sshserver[:port]] <subnets...>
sshuttle: error: at least one subnet, subnet file, or -N expected
guest@porteus:~$ sshuttle --help
usage: sshuttle [-l [ip:]port] [-r [user@]sshserver[:port]] <subnets...>

positional arguments:
  IP/MASK [IP/MASK...]  capture and forward traffic to these subnets
                        (whitespace separated)

optional arguments:
  -h, --help            show this help message and exit
  -l [IP:]PORT, --listen [IP:]PORT
                        transproxy to this ip address and port number
  -H, --auto-hosts      continuously scan for remote hostnames and update
                        local /etc/hosts as they are found
  -N, --auto-nets       automatically determine subnets to route
  --dns                 capture local DNS requests and forward to the remote
                        DNS server
  --ns-hosts IP[,IP]    capture and forward DNS requests made to the following
                        servers
  --method TYPE         auto, nat, tproxy, pf
  --python PATH         path to python interpreter on the remote server
  -r [USERNAME@]ADDR[:PORT], --remote [USERNAME@]ADDR[:PORT]
                        ssh hostname (and optional username) of remote
                        sshuttle server
  -x IP/MASK, --exclude IP/MASK
                        exclude this subnet (can be used more than once)
  -X PATH, --exclude-from PATH
                        exclude the subnets in a file (whitespace separated)
  -v, --verbose         increase debug message verbosity
  -V, --version         print the sshuttle version number and exit
  -e CMD, --ssh-cmd CMD
                        the command to use to connect to the remote [ssh]
  --seed-hosts HOSTNAME[,HOSTNAME]
                        comma-separated list of hostnames for initial scan
                        (may be used with or without --auto-hosts)
  --no-latency-control  sacrifice latency to improve bandwidth benchmarks
  --wrap NUM            restart counting channel numbers after this number
                        (for testing)
  --disable-ipv6        disable IPv6 support
  -D, --daemon          run in the background as a daemon
  -s PATH, --subnets PATH
                        file where the subnets are stored, instead of on the
                        command line
  --syslog              send log messages to syslog (default if you use
                        --daemon)
  --pidfile PATH        pidfile name (only if using --daemon) [./sshuttle.pid]
  --firewall            (internal use only)
  --hostwatch           (internal use only)
guest@porteus:~$
Установите python-2.7.13-i586-2_slack14.2.txz и sshuttle-0.78.1-i586-1_slonly.txz
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

oermolaev
White ninja
White ninja
Posts: 22
Joined: 08 Jul 2017, 20:57
Distribution: porteus
Location: Russia

Установка sshuttle. Не получается.

Post#3 by oermolaev » 14 Aug 2017, 09:08

Blaze wrote:
14 Aug 2017, 08:51
$ python /usr/bin/sshuttle
питоном попробовать запустить я не догадался. Сейчас проверю.
Blaze wrote:
14 Aug 2017, 08:51
Установите python-2.7.13-i586-2_slack14.2.txz и sshuttle-0.78.1-i586-1_slonly.txz
- имеется ввиду именно установить в систему, а не модулями?

User avatar
Blaze
Moderator
Moderator
Posts: 1330
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Установка sshuttle. Не получается.

Post#4 by Blaze » 14 Aug 2017, 09:18

Сконвертировать в модули, скопировать в /mnt/sdb1/porteus/modules и активировать.
sdb1 раздел с Porteus.
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

oermolaev
White ninja
White ninja
Posts: 22
Joined: 08 Jul 2017, 20:57
Distribution: porteus
Location: Russia

Установка sshuttle. Не получается.

Post#5 by oermolaev » 14 Aug 2017, 09:58

Вот что имеется:

Code: Select all

# ll /mnt/sdb1/porteus/modules/
итого 18620
-rw-r--r-- 1 root root 18960384 авг 14 12:33 python-2.7.13-i586-bundle.xzm
-rw-r--r-- 1 root root    77824 авг 14 12:34 sshuttle-0.78.1-i586-1_slonly.xzm

Code: Select all

# python /usr/bin/sshuttle 
Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources
И чего то всё равно не хватает...

User avatar
Blaze
Moderator
Moderator
Posts: 1330
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Установка sshuttle. Не получается.

Post#6 by Blaze » 14 Aug 2017, 10:54

Устанавливайте не через USM. Сконвертируйте вручную python-2.7.13-i586-2_slack14.2.txz и sshuttle-0.78.1-i586-1_slonly.txz в xzm модули.
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

oermolaev
White ninja
White ninja
Posts: 22
Joined: 08 Jul 2017, 20:57
Distribution: porteus
Location: Russia

Установка sshuttle. Не получается.

Post#7 by oermolaev » 14 Aug 2017, 11:51

сделал по вашему:

Code: Select all

# ll /mnt/sdb1/porteus/modules/
итого 14992
-rw-r--r-- 1 root root 15249408 авг 14 14:25 python-2.7.13-i586-2_slack14.2.xzm
-rw-r--r-- 1 root root    77824 авг 14 14:32 sshuttle-0.78.1-i586-1_slonly.xzm
Результат тот же:

Code: Select all

# python /usr/bin/sshuttle
Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 5, in <module>
    from pkg_resources import load_entry_point
ImportError: No module named pkg_resources

User avatar
Blaze
Moderator
Moderator
Posts: 1330
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus 3.2 Cinnamon x86_64
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Установка sshuttle. Не получается.

Post#8 by Blaze » 14 Aug 2017, 17:55

1) лучше, не засоряя систему, импортируйте модуль pkg_resources вручную через python. Для этого откройте терминал и введите

Code: Select all

python
import pkg_resources
# нажмите на клавиатуре в сочетании Ctrl+D и запускайте
python /usr/bin/sshuttle --help
2) если не получится, то установите setuptools-28.6.1-i586-1gds.txz (он же python-setuptools)
3) или выполните в терминале:

Code: Select all

su
toor
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
# или
curl https://bootstrap.pypa.io/ez_setup.py | python
# запускайте
python /usr/bin/sshuttle --help
Linux porteus 4.12.7-porteus #1 SMP PREEMPT Sun Aug 13 17:38:30 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

oermolaev
White ninja
White ninja
Posts: 22
Joined: 08 Jul 2017, 20:57
Distribution: porteus
Location: Russia

Установка sshuttle. Не получается.

Post#9 by oermolaev » 15 Aug 2017, 07:48

По первому пункту неудача:
На втором пункте всё сложилось, спасибо!

Post Reply