Judgment method: 1. Use the netstat command to check whether the specified port is open. The syntax is "netstat -an | grep '22'"; 2. Use the ps command to check the process information. If the process information is displayed, it means that sftp has been opened. , the syntax is "ps -ef | grep sftp".
#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.
The rpm command can only detect software packages installed through rpm or yum. If the software is installed through other methods, it cannot be found. .
Check whether vsftpd is installed through the rpm command: rpm -qa | grep vsftpd
.
Because you can use sftp to upload files after the server gets it, there must be such an sftp service and the service has been turned on. After confirming that it was not installed through the package manager, you can view the service by querying the process or port.
Specific operations
1. Check whether the port is open
netstat -an | grep '22'
2. Check the process:
ps -ef | grep sftp
The above is the detailed content of How to determine whether sftp is enabled in linux. For more information, please follow other related articles on the PHP Chinese website!