[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
问题:
想通过远程桌面连接树莓派,结果出现下面这个警告。。。。
一、远程桌面由于以下原因之一无法连接到远程计算机:
1)未启用对服务器的远程访问
2)远程计算机已关闭
3)在网络上远程计算机不可用
下面我们按照顺序依次来分析
<>第一步
看被远程机器是否勾选了“允许远程用户连接到此计算机”的选项(右键我的电脑——属性——远程)
贴图:
<>第二步
查看远程计算机自带防火墙是否关闭,没有关闭关了就行(右键右下角的网络连接——打开防火墙设置)
in+r输入 services.msc(直接控制面板找也行)
注意:有的评论说关闭了防火墙之后,在crt中ping不通了,假如是这样的话,我们就不关闭了。
找到允许应用通过防火墙这个选项,然后更改设置,把和远程桌面相关的都勾选上。。。
<>第三步
未启用对服务器的远程访问
第三个原因可能就是远程计算机上的远程桌面服务没有开启了,步骤如下:
Windows开始=>搜索框搜索 服务 =>然后找到Remote Desktop
Services这个服务=>右键属性,选择启动,最好将启动方式设置为自动,最后确认
<>第四步
这三步应该可以解决问题,如果不能,那么尝试重启xrdp服务
sudo /etc/init.d/xrdp restart
输入如下命令 ,检查3350 3389 22 这三个端口处于LISTEN,一般就没问题了。
netstat -tnl
<>补充:安装配置Xrdp
xrdp是一个开源的远程桌面服务器,支持Windows远程桌面连接,但是xrdp需要使用tightvncserver作为其基础服务,所以在树莓派上需要同时安装xrdp和tightvncserver两个服务,Windows才能远程连接到树莓派。确保树莓派和
操控电脑位于同一局域网内(连接同一wifi即可)
输入:
sudo apt-get install xrdp
sudo apt-get install tightvncserver xrdp
然后重启xrdp服务:sudo /etc/init.d/xrdp restart
查看ip地址:
hostname -I
或者ifconfig
然后使用Windows系统自带的远程桌面连接工具(通过【开始菜单】->【Windows附件】->【远程桌面连接】打开)连接树莓派。
初始账户名:pi
密码:raspberry
ending