I created a user named allen and changed its shell to rbash.
then set his environment like this
Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
unset PATH
PATH=$PATH:/home/allen/bin
export PATH
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[18049]: Accepted password for allen from 10.0.1.6 port 44205 ssh2
Mar 6 01:58:08 localhost sshd[18049]: pam_unix(sshd:session): session opened for user allen by (uid=0)
Mar 6 01:58:08 localhost sshd[18051]: subsystem request for sftp
Mar 6 01:58:08 localhost sshd[18049]: 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