1 安装ssh 和 openssh-server之后通过SecureCRT 可以连接,FileZilla不能使用sftp方式进行连接,
安装vsftpd后测试ftp可以连接,
修改 /etc/ssh/sshd_config文件 行 Subsystem sftp /usr/lib/openssh/sftp-server注释掉,改为Subsystem sftp internal-sftp
(Subsystem:配置一个外部子系统(例如,一个文件传输守护进程)。仅用于SSH-2协议。 值是一个子系统的名字和对应的命令行(含选项和参数)。比如"sft /bin/sftp-server"。)
添加 Match Group sftp_users
X11Forwarding no (是否允许进行 X11 转发。默认值是"no",设为"yes"表示允许。)
AllowTcpForwarding no (是否允许TCP转发,默认值为"yes"。)
ChrootDirectory /home (限制用户目录。)
ForceCommand internal-sftp (强制执行这里指定的命令而忽略客户端提供的任何命令。这个命令将使用用户的登录shell执行(shell -c)。 这可以应用于 shell 、命令、子系统的完成,通常用于 Match 块中。 这个命令最初是在客户端通过 SSH_ORIGINAL_COMMAND 环境变量来支持的。)
后可以正常使用 其中 PermitRootLogin yes 可以使用root登陆