ssh can connect but sftp can not connect

An error occurred when switching from the command line to SFTP using Xshell:
sftp subsystem request is rejected.
please make sure that sftp subsystem is properly installed in ssh server.
Here’s why:
[root@bogon ~]# tail /var/log/secure
Feb 23 16:29:48 localhost sshd[2989]: subsystem request for sftp
Feb 23 16:29:48 localhost sshd[2989]: subsystem request for sftp failed, subsystem not found
It can be seen that there is no directory for FTP – Server
Let’s look for the path address of FTP – Server:
[root@bogon ~]# locate sftp-server
/usr/libexec/openssh/sftp-server
/usr/share/man/man8/sftp-server.8.gz
Then open configuration:
[root@bogon ~]# vi /etc/ssh/sshd_config
will
# # override the default of no subsystems
Subsystem SFTP/usr/libexec/openssh/SFTP server. –
replace
# override the default of no subsystems
Subsystem SFTP/usr/libexec/openssh/SFTP server. –
Ok, load SSHD again.
[root@bogon ~]# /etc/init.d/sshd reload
Reconnect found OK.

Read More: