Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | Dernière révision Les deux révisions suivantes | ||
technique:referentiel:chd-stg1-ng [2018/05/10 19:13] admin |
technique:referentiel:chd-stg1-ng [2018/05/19 20:45] admin |
||
---|---|---|---|
Ligne 84: | Ligne 84: | ||
adduser genconf | adduser genconf | ||
passwd -dl genconf | passwd -dl genconf | ||
- | /home/genconf/.ssh/authorized_keys | ||
</code> | </code> | ||
+ | |||
+ | <file text /home/genconf/.ssh/authorized_keys> | ||
+ | command="~/.ssh/check",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ssh-rsa ... www-data@chd-tls1 | ||
+ | </file> | ||
+ | |||
+ | <file bash /home/genconf/.ssh/check> | ||
+ | #!/bin/sh | ||
+ | if [ "xsudo genconf_prod" = "x$SSH_ORIGINAL_COMMAND" ] | ||
+ | then $SSH_ORIGINAL_COMMAND; | ||
+ | else echo "Rejected" | ||
+ | fi | ||
+ | </file> | ||
<file text /etc/sudoers> | <file text /etc/sudoers> |