sFTP nologin

Svein Halvor Halvorsen svein-freebsd-questions at theloosingend.net
Tue Mar 29 04:48:38 PST 2005


* Grant Peel [2005-03-25 09:19 -0500]
>  Is there a quick - secure way to allow the sshd sFTP subsystem to allows sftp
>  connections without allowing shell accounts?


I'm using this shell-script as a "nologin"-shell:

-------------
#!/bin/sh
if [ "$1" = "-c" -a "$2" = "/usr/libexec/sftp-server" ]; then

    exec /bin/sh "$@"

else

    echo "You are not allowed to login"
    sleep 2
    exit 0

fi
-------------


This will allow sftp, but not shell login (or scp)




More information about the freebsd-questions mailing list