3 ms·
An alternative: give out a public key, but restrict it to run e.g. reboot only. Put something like the following in your ~/.ssh/authorized_keys: command="/
by JoachimSchipper 15y ago
An alternative: give out a public key, but restrict it to run e.g. reboot only. Put something like the following in your ~/.ssh/authorized_keys:
command="/sbin/reboot",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa AAAAB3Nza...LiPk== user@example.net
See sshd(8) "AUTHORIZED_KEYS FILE FORMAT" for details.
- bostonvaulter2 15y agoI think you mean give out a private key.
- ars 15y agoNo, he actually means get a public key. You should never be giving out private keys, people need to generate those themself!