How to determine whether sftp is enabled in linux

WBOY
Release: 2022-05-23 17:57:12
Original
11546 people have browsed it

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".

How to determine whether sftp is enabled in linux

#The operating environment of this tutorial: linux7.3 system, Dell G3 computer.

How to determine whether sftp is enabled in Linux

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'
Copy after login

How to determine whether sftp is enabled in linux

## Port 22 actually checks the ssh service, so you can also use netstat -an | grep 'ssh' to query.

2. Check the process:

ps -ef | grep sftp
Copy after login
It is worth noting that these two methods need to open an sftp client and have connected to the server. Find out. Unless running as vsftpd.

[notice]vsftpd runs as a daemon and can be controlled through service, so it can be directly found through the process or port. [/notice]

ps -ef displays the process in a standard format. The format is as follows

The contents of each column mean the following

UID //User ID, But the output is the user name

PID //Process ID

PPID //Parent process ID

C //Percentage of CPU occupied by the process

STIME //The time from the start of the process to the present

TTY //The process is running on which terminal. If it has nothing to do with the terminal, it will be displayed? If it is pts/0, etc., it means that the host process is connected by the network.

CMD //The name and parameters of the command

Recommended learning:

Linux video tutorial

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template