我在我的Ubuntu15.04机器上的端口4444上运行了一个php服务器。现在,当我执行telnet 127.0.0.1 4444时,它工作得很好。现在我用移动热点连接了我的机器和一台windows 7机器。我使用ifconfig获得我的ip地址,它显示
wlan0 Link encap:Ethernet HWaddr b4:b6:76:b2:18:b7
inet addr:192.168.43.115 Bcast:192.168.43.255 Mask:255.255.255.0
inet6 addr: fe80::b6b6:76ff:feb2:18b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:23468 errors:0 dropped:0 overruns:0 frame:0
TX packets:21537 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15077925 (15.0 MB) TX bytes:3582649 (3.5 MB)现在,当我在我的windows机器上执行telnet 192.168.43.115 4444时,我得到了Could not open connection to the host, on port 4444: Connect Failed。nmap -sU 127.0.0.1 -p 4444显示了以下内容
Starting Nmap 6.47 ( http://nmap.org ) at 2015-12-22 23:03 IST
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00015s latency).
PORT STATE SERVICE
4444/udp closed krb524netstat -tulpn显示了以下内容
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN 1611/php
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::21 :::* LISTEN -
tcp6 0 0 ::1:631 :::* LISTEN -
udp 0 0 127.0.1.1:53 0.0.0.0:* -
udp 0 0 0.0.0.0:68 0.0.0.0:* -
udp 0 0 0.0.0.0:21107 0.0.0.0:* -
udp 0 0 0.0.0.0:631 0.0.0.0:* -
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1744/chromium-brows
udp 0 0 0.0.0.0:5353 0.0.0.0:* -
udp 0 0 0.0.0.0:34051 0.0.0.0:* -
udp6 0 0 :::56100 :::* -
udp6 0 0 :::25246 :::* -
udp6 0 0 :::5353 :::* - 我怎么才能解决这个问题?请帮帮忙。提前感谢
发布于 2015-12-22 18:02:48
不建议使用telnet,而是使用SSH。造成这种情况的原因是,电信网络通信没有加密,很容易被窃听。
通过安装openssh- server,可以使PHP服务器允许通过SSH进行远程连接:
sudo apt安装openssh-server
如果您仍然想使用telnet,那么根据您的输出,您的Linux盒上似乎没有打开端口4444。假设您没有在该计算机上设置防火墙,则您的服务器似乎没有运行telnet服务器。要安装该服务:
sudo apt-获取安装telnetd
我希望这能帮到你。
https://askubuntu.com/questions/712463
复制相似问题