I need to restart sftp service in CentOS server. How do I restart sftp service in Linux?
You just need to restart the ssh server as per your Linux distro. For example:
Debian or Ubuntu Linux restart sftp (ssh server)
sudo systemctl restart ssh
RHEL or CentOS Linux restart sftp (ssh server)
sudo systemctl restart sshd
How to disable sftp and restart it again
Find the line in /etc/ssh/sshd_config
Subsystem sftp /usr/lib/openssh/sftp-server
Either delete it or comment it out as follows:
#Subsystem sftp /usr/lib/openssh/sftp-server
Save and close the file. Restart your ssh service. That is all.