Page MenuHomeVyOS Platform

ssh: re-generating server key causes PermissionError
Closed, ResolvedPublicBUG

Description

vyos@vyos:~$ generate ssh server-key
Do you really want to remove the existing SSH host keys? [y/N] y
Traceback (most recent call last):
  File "/usr/libexec/vyos/op_mode/generate_ssh_server_key.py", line 31, in <module>
    cmd('systemctl restart ssh.service')
  File "/usr/lib/python3/dist-packages/vyos/utils/process.py", line 155, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: systemctl restart ssh.service
returned:
exit code: 1

Details

Version
1.4.3
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)
Forum thread
https://forum.vyos.io/t/generating-new-ssh-keys/16923