linux 禁用scp

1.系统环境:CentOS Linux release 7.7.1908 (Core)
2.ssh 版本:OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
3.禁止scp
3.1 rpm -qa|grep openssh-*
3.2 yum remove openssh-clients -y
4.重启sshd服务
systemctl restart sshd.service

5. 禁止sftp服务
5.1 修改sshd配置文件 /etc/ssh/sshd.config
5.2 vi /etc/ssh/sshd.config
5.3 将  # Subsystem sftp /usr/libexec/openssh/sftp-server  信息前面加上"#"
6.重启sshd服务
  systemctl restart sshd.service

  

原文地址:https://www.cnblogs.com/zf-crazy/p/14261443.html