(2022-08-19 14:55:17 отредактировано ЗАО "Северная чернь")

Raspbian, usbip, проброс Rutoken Lite на сервер

Добрый день.
Цель:
1) Развернуть usbip сервер на Raspberry Pi с ОС Raspbian.
2) Подключить Rutoken с Raspbian к серверу Windows Server 2008 R2 Enterprise через usbip

Оборудование:
1) Сервер usbip на Raspbian настроен , используется usbip-utils 2.0.
2) Клиент на Windows Server 2008 R2 используется usbip 0.2.0

Тестировал проброс обычной флешки на сервер, все работает , проброс есть, файлы видит, проблем нет. Подключаю Rutoken Lite, делаю все тоже самое, но проброса не происходит. По инструкции установил следующие пакеты: libccid pcscd libpcsclite1 pcscd pcsc-tools opensc. Перезагрузил, попробовал снова результат тот же. Проверил работает ли Rutoken командой: "pcsc_scan"

Вывод:
------------------------------------------------------------------
Using reader plug'n play mechanism
Scanning present readers...
0: Aktiv Rutoken lite 00 00

Fri Aug 19 11:56:04 2022
Reader 0: Aktiv Rutoken lite 00 00
  Event number: 0
  Card state: Card inserted,
  ATR: 3B 8B 01 52 75 74 6F 6B 65 6E 6C 69 74 65 C2

ATR: 3B 8B 01 52 75 74 6F 6B 65 6E 6C 69 74 65 C2
+ TS = 3B --> Direct Convention
+ T0 = 8B, Y(1): 1000, K: 11 (historical bytes)
  TD(1) = 01 --> Y(i+1) = 0000, Protocol T = 1
-----
+ Historical bytes: 52 75 74 6F 6B 65 6E 6C 69 74 65
  Category indicator byte: 52 (proprietary format)
+ TCK = C2 (correct checksum)

Possibly identified card (using /usr/share/pcsc/smartcard_list.txt):
3B 8B 01 52 75 74 6F 6B 65 6E 6C 69 74 65 C2
    Aktiv Rutoken Lite
    https://www.rutoken.ru/products/all/rutoken-lite/

------------------------------------------------------------------
Что по инструкции говорит, то что Rutoken работает и исправен.

В логах тоже не на что не ругается:
------------------------------------------------------------------------------
root@raspberrypi:~# tail -f /var/log/syslog
Aug 19 13:34:07 raspberrypi usbipd: usbipd: info: request 0x8005(6): complete
Aug 19 13:34:07 raspberrypi usbipd: usbipd: info: connection from 192.168.0.245:58252
Aug 19 13:34:07 raspberrypi usbipd: usbipd: info: received request: 0x8003(6)
Aug 19 13:34:07 raspberrypi usbipd: usbipd: info: found requested device: 1-1.4
Aug 19 13:34:07 raspberrypi kernel: [  105.636016] usbip-host 1-1.4: stub up
Aug 19 13:34:07 raspberrypi usbipd: usbip: info: connect: 1-1.4
Aug 19 13:34:07 raspberrypi usbipd: usbipd: info: request 0x8003(6): complete
Aug 19 13:35:07 raspberrypi kernel: [  165.585333] usbip-host 1-1.4: recv a header, -104
Aug 19 13:35:07 raspberrypi kernel: [  165.682208] usbip-host 1-1.4: reset full-speed USB device number 4 using dwc_otg
Aug 19 13:35:07 raspberrypi kernel: [  165.814407] usbip-host 1-1.4: device reset
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: connection from 192.168.0.245:58304
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: received request: 0x8005(6)
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: exportable devices: 1
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: request 0x8005(6): complete
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: connection from 192.168.0.245:58305
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: received request: 0x8003(6)
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: found requested device: 1-1.4
Aug 19 13:40:36 raspberrypi kernel: [  460.071093] usbip-host 1-1.4: stub up
Aug 19 13:40:36 raspberrypi usbipd: usbip: info: connect: 1-1.4
Aug 19 13:40:36 raspberrypi usbipd: usbipd: info: request 0x8003(6): complete
Aug 19 13:41:27 raspberrypi kernel: [  510.711447] usbip-host 1-1.4: recv a header, -104
Aug 19 13:41:27 raspberrypi kernel: [  510.804735] usbip-host 1-1.4: reset full-speed USB device number 4 using dwc_otg
Aug 19 13:41:27 raspberrypi kernel: [  510.936914] usbip-host 1-1.4: device reset
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: connection from 192.168.0.245:58308
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: received request: 0x8005(6)
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: exportable devices: 1
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: request 0x8005(6): complete
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: connection from 192.168.0.245:58309
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: received request: 0x8003(6)
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: found requested device: 1-1.4
Aug 19 13:41:43 raspberrypi kernel: [  526.640606] usbip-host 1-1.4: stub up
Aug 19 13:41:43 raspberrypi usbipd: usbip: info: connect: 1-1.4
Aug 19 13:41:43 raspberrypi usbipd: usbipd: info: request 0x8003(6): complete

-------------------------------------------------------------------------------

А на клиенте (Windows Server 2008 R2) при выполнении команды подключения: "usbip.exe -a 192.168.0.213 1-1.4", просто висит в ожидании, ничего не происходит, В "Панели управления Рутокен", Rutoken не определяет. Поискал по вашему форуму, нашел относительно похожую статью, установил пакет "libpam-p11", перезагрузил, результат тот же, подключение есть, но проброса не происходит, в чем может быть проблема? Каких пакетов не хватает еще?

Re: Raspbian, usbip, проброс Rutoken Lite на сервер

ЗАО "Северная чернь", добрый день.
Вы уверены что данная утилита умеет пробрасывать USB CCID устройства?

Re: Raspbian, usbip, проброс Rutoken Lite на сервер

Не могу об этом утверждать, но изучая статьи по настройке usbpip серверной части и клиента, в одном из примеров используется "Yubikey 4/5 OTP+U2F+CCID" для проброса

Re: Raspbian, usbip, проброс Rutoken Lite на сервер

Добрый день!

ЗАО "Северная чернь" пишет:

В логах тоже не на что не ругается:

Логи интерпретированы некорректно. Вот ошибка:

ЗАО "Северная чернь" пишет:

Aug 19 13:35:07 raspberrypi kernel: [  165.585333] usbip-host 1-1.4: recv a header, -104

https://github.com/torvalds/linux/blob/ … _rx.c#L643

Судя по месту возникновения ошибки, можно предположить, что проблема где-то в сетевом взаимодействии. Возможно, не совпадают версии клиента и сервера.

Re: Raspbian, usbip, проброс Rutoken Lite на сервер

В общем проблема связана вот с этим https://dev.rutoken.ru/display/KB/RU1003. Проблема с доступом к рутокену по RDP. "При одновременном подключении пользователей по протоколу RDP, к удаленному компьютеру каждый пользователь работает только со своим Рутокеном и видит только свои ключи и сертификаты в Панели управлении Рутокен." Это так задуманы ограничения что один Рутокен не может быть проброшен до сервера для всех пользователей?