Advertisement
Guest User

Untitled

a guest
Mar 30th, 2020
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. users.users.nixosfoundationbackups =
  2. let
  3. zfs-ssh = pkgs.writeScript "zfs-ssh" ''
  4. #! /bin/sh -e
  5. [[ "$SSH_ORIGINAL_COMMAND" == zfs* ]]
  6. eval "$SSH_ORIGINAL_COMMAND"
  7. '';
  8. in {
  9. # the user needs to be able to execute commands remotely, thus having a shell:
  10. isNormalUser = true;
  11. openssh.authorizedKeys.keys = [
  12. "command=\"${zfs-ssh}\",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOyyr/4fMKQ1fwa5DjFVIHQLchr4EKcOWEI++gYBTbWF root@haumea"
  13. ];
  14. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement