Hi,

I want to setup a sftp ONLY server using openssh with internal-sftp
and chrootdirectory feature. The sftp does work fine. It did what I
expect. I can chroot, uploading/downloading,etc. But I want that ssh
and scp are both denied at user's login, e.g, displaying an error
message stating 'account not availabe', something like that. But with
internal-sftp and chrootdirectory, the ssh session will hang, same
thing for scp. I have tried openssh version 4.9, 5.0, 5.1. They are
all same behavior. The configuration for sftp part looks like the
following:


Subsystem sftp internal-sftp
Match Group sftponly
ForceCommand internal-sftp
ChrootDirectory %u


The user's shell is set to /sbin/nologin. I tried on Fodera system.


Any help?


--xinhuan