How to: Turning off SFTP server under Linux / UNIX cpanel server
Q. I've CentOS Linux cpanel server. I'd like to turn off SFTP server but only allow SSH for root user. How do I trun off sftp server?
A. OpenSSH / sshd reads configuration data from /etc/ssh/sshd_config. The file contains keyword-argument pairs, one per line. Lines starting with ‘#’ and empty lines are interpreted as comments. Configures an external subsystem such file transfer daemon (SFTP) done through this file only. Arguments should be a subsystem name and a command to execute upon subsystem request. The command sftp-server implements the “sftp” file transfer subsystem. sftp-server is a program that speaks the server side of SFTP protocol. sftp-server is not intended to be called
directly, but from sshd using the Subsystem option.
Disable / Turn off sftp server
Open /etc/ssh/sshd_config file:
# vi /etc/ssh/sshd_config
Find line that read as follows:
Subsystem sftp /usr/lib/openssh/sftp-server
Remove or comment out line by prefixing #:
# Subsystem sftp /usr/lib/openssh/sftp-server
Save and close the file. Restart sshd service:
# /etc/init.d/sshd restart
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- Linux List All Outdated Packages Which Could be Updated and Applied to System
- CentOS / Red Hat Linux Install VSFTPD FTP Server
- Find Out Vmware Server Version Under Linux Server
- Linux Failure (4322): Configuration Initialization Failed - Error and Solution
- Linux Move swap space from one location to another location
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: centos_linux, configuration_data, cpanel, disable_sftp-server, openssh, root_user, sftp_server, ssh, sshd, UNIX




Recent Comments
Today ~ 70 Comments
Today ~ 2 Comments
Yesterday ~ 10 Comments
Yesterday ~ 12 Comments
09/03/2008 05:29 pm (2 days ago) ~ 6 Comments