Prohibit SCP and SFTP command steps in Linux

Source: Internet
Author: User
Tags ssh file transfer protocol scp command

SFTP Introduction

SFTP is a secure File Transfer protocol abbreviation for security FTP. You can provide a secure encryption method for transferring files. SFTP and FTP have almost the same syntax and functionality

Introduction to SCP

Transfer files between two hosts generally use the SCP command, usually using the SCP command to obtain each other's Linux host files via SSH, you need to enter a password confirmation, the method is almost.

Prohibition of SCP and SFTP commands

System: CentOS 5.x

1. First prohibition of SCP
Rpm-qa|grep openssh-*
Yum Remove openssh-clients-y

After you delete the openssh-clients, and then execute the SCP, you'll report the following error:

-bash:scp:command not found

2. Prohibition of SFTP
subsystem Sftp/usr/libexec/openssh/sftp-server
Note This line, as follows:
#Subsystem Sftp/usr/libexec/openssh/sftp-server

After exiting save, restart sshd:
Service sshd Restart

Okay, so we can get the job done.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.