`

restrict authorized_keys

SSH 
阅读更多
command="/home/someuser/rsync/checkrsync",from="trusted.eng.cam.ac.uk",no-port-forwarding,no-X11-forwarding,noagent-forwarding,no-pty ssh-rsa AAAAB

 checkrsnc:

#!/bin/sh

case "$SSH_ORIGINAL_COMMAND" in
        *\&*)
                echo "Rejected"
                ;;
        *\(*)
                echo "Rejected"
                ;;
        *\{*)
                echo "Rejected"
                ;;
        *\;*)
                echo "Rejected"
                ;;
        *\<*)
                echo "Rejected"
                ;;
        *\`*)
                echo "Rejected"
                ;;
        rsync\ --server*)
                $SSH_ORIGINAL_COMMAND
                ;;
        *)
                echo "Rejected"
                ;;
esac
 
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics