登录服务器想通过ssh下载个文件。使用SSH Secure File Transfer Client连接服务器,提示如下信息:
"File transfer server could not be started or it exited unexpectedly.
Exit value 0 was returned. Most likely the sftp-server is not in the path of the user on the server-side."
解决办法是:在.bashrc文件中,测试一下是交互SHELL还是非交互的,如果是非交互的,则直接退出即可。
一般在.bashrc文件的最前边加入下面这行就可以了:
[ -z "$PS1" ] && return 经测试,我的服务器添加该命令可以传输文件。服务器系统:Centos 5
或者:
[ $- != *i* ] && return

396



被折叠的 条评论
为什么被折叠?



