Page MenuHomeVyOS Platform

Command 'restart ssh' not working
Closed, ResolvedPublicBUG

Description

Command restart ssh is not working as expected after making it vrf-aware:

vyos@vyos:~$ show config comm | grep ssh
set service ssh
vyos@vyos:~$ restart  ssh 
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xeu ssh.service" for details.
vyos@vyos:~$

Details

Difficulty level
Easy (less than an hour)
Version
1.5-rolling-202406190020
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

n.fort changed the task status from Open to Confirmed.
n.fort changed Issue type from Unspecified (please specify) to Bug (incorrect behavior).

Command to restart when ssh running on default vrf:

sudo systemctl restart [email protected]

If ssh is running on non-default VRF, command seems to work as expected:

vyos@vyos:~$ show config comm | grep ssh
set service ssh vrf 'FOO'
vyos@vyos:~$ sudo systemctl status | grep -i ssh
           │ ├─system-ssh.slice
           │ │ └─[email protected]
           │ │       └─2438 "sshd: /usr/sbin/sshd -f /run/sshd/sshd_config [listener] 0 of 10-100 startups"
               │ ├─2940 grep -i ssh
vyos@vyos:~$ restart ssh
vyos@vyos:~$ sudo systemctl status | grep -i ssh
           │ ├─ssh.service
           │ │ └─2975 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups"
           │ ├─system-ssh.slice
           │ │ └─[email protected]
           │ │       └─2438 "sshd: /usr/sbin/sshd -f /run/sshd/sshd_config [listener] 0 of 10-100 startups"
               │ ├─2977 grep -i ssh
vyos@vyos:~$
c-po changed the task status from Confirmed to In progress.Jun 21 2024, 10:23 AM
c-po claimed this task.
c-po changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
c-po changed Is it a breaking change? from Unspecified (possibly destroys the router) to Perfectly compatible.
c-po moved this task from Need Triage to Finished on the VyOS 1.5 Circinus board.
c-po moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta (1.4.1) board.