Salut, On Mon, Dec 06, 2010 at 12:03:07AM +0100, eldre8 wrote: > > un petit ajout, par rapport au dummy shell, cette ligne devrait > bypasser ton dummyshell ;) > > ssh toto /bin/bash (et en plus y a pas forcement de log wtmp ihih) > man sshd_config indique forcecommand,
Bon point pour ForceCommand ! Il est aussi possible de forcer la commande depuis le fichier "authorized_keys": command="/usr/bin/rsync --server" ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtmX4Jx8NGcCEiwEIQAcHKS1s+N9GLzca9Ffu4ItBEB/6jVTEoamnxnYt0WHQ0I+jpN3g/k2lF3MTncUjwrLorWSxPLI6giGTheT4vhLZQOVZV4O+GS0CETMKVsrclPLhHouW891QU84eHACuTh+KUvuhs3pV0EHYHnAVCIs8JuU03ZTNIIuuYFVf7P3BCIa8pnncUcy722ZB7qlWCjjjpBxLGr1/EyOTsZD76Kl8BBoiZDwXCgFzvKYe2NqhqRBb8bo0CP6QyyROxcgBLYtvBJurhMNQ7qTZJBF5DjeDQrCvCZsEwlffV5BFoQY5ISnZgkKC00Ww65y6+EwCZ9WvSw== wwws...@wikileaks.org Pour information, s'il y avait plus d'une commande à autoriser (ou bien une liste d'argument qui peut changer), il faut nécessairement passer par un wrapper et implémenter les validations dont on a besoin. Voici un exemple qui n'autorise que "rsync --server" (pas testé cela dit) : % #!/bin/sh % % # Update to fit your setup. This one should suit almost anyone though. % PATH=/bin:/usr/bin:/usr/local/bin:/usr/pkg/bin % % RSYNC=$(which rsync) || exit 1 % % set -f % set -- $SSH_ORIGINAL_COMMAND % set +f % % [ "x$1" = "x$RSYNC" ] || exit 1 % [ "x$2" = "x--server" ] || exit 1 % % exec "$@" -- Jeremie Le Hen Humans are born free and equal. But some are more equal than others. Coluche _______________________________________________ Liste de diffusion du FRsAG http://www.frsag.org/