Why is the SFTP subsystem request being rejected?

PROBLEM DESCRIPTION or QUESTION


When attempting an SFTP connection to my remote server, I am getting the following error:

SFTP subsystem request is rejected.
Please make sure that SFTP subsystem is properly installed in SSH server.

RESOLUTION


The SFTP Protocol uses the SSH protocol. The SSH service daemon calls the SFTP subsystem to facilitate a file transfer.

If you have root privilege

Normally, the SFTP subsystem is specified in the SSH Service Daemon Configuration file for utilization.

$ sudo cat /etc/ssh/sshd_config
...
# override default of no subsystems
Subsystem	sftp	/usr/lib/openssh/sftp-server
...

If this configuration is not set or commented out with #, you need to uncomment it or configure it properly with a manual. This setting requires root priveleges.

After making the configurations, the SSH server needs to be restarted.


If you do not have root privileges

Even if you do not have the root privileges, you can utilize the SFTP service via Xftp's 'Use custom SFTP server' function.

This feature can be set in the session's properties → SFTP Setup.

You will need to find the location of the sftp subsystem program on the remote system.

It is typically described in the SSH configuration file which is located at /etc/ssh/sshd_config.