Moving the SSH service into any VRF will not work accross reboots.
Once the system is rebooted SSHd can't be started as it errors out with the following message:
Jul 04 20:26:34 vyos systemd[1]: Starting OpenBSD Secure Shell server... Jul 04 20:26:34 vyos ip[1453]: Failed to load BPF prog: 'Operation not permitted' Jul 04 20:26:34 vyos systemd[1]: ssh.service: Main process exited, code=exited, status=1/FAILURE Jul 04 20:26:34 vyos systemd[1]: ssh.service: Failed with result 'exit-code'. Jul 04 20:26:34 vyos systemd[1]: Failed to start OpenBSD Secure Shell server. Jul 04 20:26:34 vyos systemd[1]: ssh.service: Service RestartSec=100ms expired, scheduling restart. Jul 04 20:26:34 vyos systemd[1]: ssh.service: Scheduled restart job, restart counter is at 1. Jul 04 20:26:34 vyos systemd[1]: Stopped OpenBSD Secure Shell server. Jul 04 20:26:34 vyos systemd[1]: Starting OpenBSD Secure Shell server...
It can be reproduced by:
set interfaces ethernet eth0 vif 201 address '172.18.201.10/24' set interfaces ethernet eth0 vif 201 vrf 'red' set protocols vrf red static route 0.0.0.0/0 next-hop 172.18.201.254 set service ssh vrf 'red' set vrf name red table '1000'
This is also a possible issue for other VRF based services like SNMP and NTP - thus the same change will be applied here, too