How to switch of PC that's running HA linux via terminal command

Just found this and it includes a solution for your problem:
https://community.home-assistant.io/t/remote-ssh-command-error-255/187891