I created a user named allen and changed its shell to rbash.
then set his environment like this
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
# User specific environment and startup programs
then only copy /bin/su to /home/allen/bin
and I can login with SSH Secure Shell Client by this user but can't with SSH Secure File Transfer Client
below is the server log at /var/log/secure
Mar 6 01:58:08 localhost sshd: Accepted password for allen from 10.0.1.6 port 44205 ssh2
Mar 6 01:58:08 localhost sshd: pam_unix(sshd:session): session opened for user allen by (uid=0)
Mar 6 01:58:08 localhost sshd: subsystem request for sftp
Mar 6 01:58:08 localhost sshd: pam_unix(sshd:session): session closed for user allen
belw is the error log at client side
Exit value 1 was returned.Most likely the sftp-server is not in the path of the user on the server-side.
anyone can give me a hand