Advertisement
peetaur

sftponly

Mar 11th, 2014
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/sh
  2. if [ "$SSH_ORIGINAL_COMMAND" = "/usr/lib/openssh/sftp-server" ]; then
  3.     /usr/lib/openssh/sftp-server
  4.     exit $?
  5. fi
  6.  
  7. echo 'This account is restricted to sftp only.'
  8. exit 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement