Closed mtfurlan closed 6 years ago
easiest way is probably to create the "do one thing" as a script, then make that script the defined shell of the user.
Just for curiosity, why does this need a separate user instead of a cron job? And is this sshing to itself?
https://www.i3detroit.org/spaceapi/status.json Did: https://www.howtoforge.com/restricting-users-to-sftp-plus-setting-up-chrooted-ssh-sftp-debian-squeeze and spaceapi is chroot jailed in /home/spaceapi with write access to /home/spaceapi/json, and symlinked /home/spaceapi/json to /var/www/spaceapi
Need to make an account on the i3 server and figure out how to make that account only able to do the one thing.
curl http://10.13.0.22:8123/api/spaceapi | ssh i3 "cat - > /var/www/spaceapi.json"