检测linux系统下ftp服务器是否开启的方法如下:
1、第一步,打开一台Linux的电脑,进入到输入shell指令的命令行状态下,如下图所示。
2、第二步,使用键盘在命令行中输入:”service vsftp status“这个指令,指令的意思是查看ftp服务器的状态,如下图所示。
3、第三步,输入完成之后,点击”回车键“运行该指令,就会显示ftp服务器的开关状态,比如下图就是“inactive”状态,表示ftp服务器处于关闭状态,如下图所示。
linux查看ftp服务是否安装,用到的工具:xshell,步骤如下:
登录linux服务器,执行以下两条命令:
ps -aux | grep ftpdnetstat -na | grep 21
输出:
[root@ebs-18307 ~]# ps -aux | grep ftpdroot 474 0.0 0.0 153652 852 ? Ss Mar06 0:00 pure-ftpd (SERVER)
root 15556 0.0 0.0 112648 976 pts/0 S+ 11:13 0:00 grep --color=auto ftpd
[root@ebs-18307 ~]# netstat -na | grep 21
tcp 0 0 211.149.155.84:80 61.158.167.19:61072 SYN_RECV
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN
tcp 0 52 211.149.155.84:22000 106.114.77.228:30522 ESTABLISHED
tcp 0 0 211.149.155.84:80 218.31.113.112:60611 TIME_WAIT
tcp 0 0 211.149.155.84:80 120.76.25.49:65426 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60648 TIME_WAIT
tcp 0 0 211.149.155.84:80 211.149.175.214:39829 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60681 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60630 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60642 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60672 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60636 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60646 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60638 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60626 TIME_WAIT
tcp 0 0 211.149.155.84:80 110.74.194.66:15815 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60644 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60670 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60632 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60628 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60634 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60640 TIME_WAIT
tcp 0 0 211.149.155.84:80 218.31.113.112:60624 TIME_WAIT
tcp6 0 0 :::21 :::* LISTEN
unix 3 [ ] STREAM CONNECTED 12100 /var/run/dbus/system_bus_socket
unix 2 [ ] DGRAM 12124
unix 3 [ ] STREAM CONNECTED 12122 /var/run/dbus/system_bus_socket
unix 2 [ ] DGRAM 12101
unix 3 [ ] STREAM CONNECTED 12121
说明:从代码上可以分析到,演示linux服务器安装了pure-ftpd,开启了21端口。
效果图:
注意事项:ftp端口默认是21,可以更改。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)