LINUX.ORG.RU

НЕ работает autossh

 ,


0

2

Еcть юнит systemd:

[Unit]
Description=Autossh Tunnel Service
After=network.target

[Service]
User=sergey
ExecStart=/usr/bin/autossh -M 0 \
          -NCq \
          -o "ExitOnForwardFailure=yes" \
          -o "ServerAliveInterval 30" \
          -o "ServerAliveCountMax 3" \
          -D 0.0.0.0:1080 \
          -i /home/sergey/.ssh/id_rsa \
          -p 10022 \
          sergey@onanizm.ru

[Install]
WantedBy=multi-user.target

При старте системы в статусе все время exit с ошибкой 255. Как исправить? Есть у кого рабочий? При netwok.target файловая система еще не смонтирована?

★★

Ответ на: комментарий от t184256
× autossh-tunnel.service - Autossh Tunnel Service
     Loaded: loaded (/etc/systemd/system/autossh-tunnel.service; enabled; vendor preset: disabled)
     Active: failed (Result: exit-code) since Tue 2021-08-10 12:43:54 MSK; 1h 41min ago
    Process: 591 ExecStart=/usr/bin/autossh -M 0 -NCq -o ExitOnForwardFailure=yes -o ServerAliveInterval 30 -o ServerAliveCountMax 3 -D 0.0.0.0:1>
   Main PID: 591 (code=exited, status=1/FAILURE)
        CPU: 8ms

Aug 10 12:43:54 sergey-laptop systemd[1]: Started Autossh Tunnel Service.
Aug 10 12:43:54 sergey-laptop autossh[591]: port set to 0, monitoring disabled
Aug 10 12:43:54 sergey-laptop autossh[591]: starting ssh (count 1)
Aug 10 12:43:54 sergey-laptop autossh[591]: ssh child pid is 596
Aug 10 12:43:54 sergey-laptop autossh[591]: ssh exited prematurely with status 255; autossh exiting
Aug 10 12:43:54 sergey-laptop systemd[1]: autossh-tunnel.service: Main process exited, code=exited, status=1/FAILURE
Aug 10 12:43:54 sergey-laptop systemd[1]: autossh-tunnel.service: Failed with result 'exit-code'.
tz4678 ★★
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.