判断 ip为 192.168.1.15 的 21 端口是否开启的命令
时间: 2024-05-02 19:17:27 浏览: 14
可以使用以下命令来判断IP为192.168.1.15的21端口是否开启:
```
telnet 192.168.1.15 21
```
如果21端口开启,则会出现类似以下的提示信息:
```
Trying 192.168.1.15...
Connected to 192.168.1.15.
Escape character is '^]'.
220 FTP Server ready.
```
如果21端口未开启,则会出现类似以下的提示信息:
```
Trying 192.168.1.15...
telnet: connect to address 192.168.1.15: Connection refused
telnet: Unable to connect to remote host
```
也可以使用以下命令来判断IP为192.168.1.15的21端口是否开启:
```
nc -zv 192.168.1.15 21
```
如果21端口开启,则会出现类似以下的提示信息:
```
Connection to 192.168.1.15 21 port [tcp/ftp] succeeded!
```
如果21端口未开启,则会出现类似以下的提示信息:
```
nc: connect to 192.168.1.15 port 21 (tcp) failed: Connection refused
```
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![csv](https://img-home.csdnimg.cn/images/20210720083646.png)