无显示器连接树莓派

栏目: 软件资讯 · 发布时间: 5年前

内容简介:本文主要讲解无显示连接树莓派点击这里

本文主要讲解无显示连接树莓派

下载镜像

点击这里 下载 ,如图所示:

无显示器连接树莓派

刻录镜像

1.下载如图所示的程序

无显示器连接树莓派

2.参考如图制作镜像

无显示器连接树莓派

开启 SSH

写个空文件文件到 sd 卡中,文件名 SSH,因为树莓派默认把 SSH 给禁止了,我这里用sublime Text 编辑器创建一个空文件保存在 sd 卡的 根目录下

无显示器连接树莓派

配置 WiFi

写一个配置文件 wpa_supplicant.conf 到 sd 卡的根目录

其中 wpa_supplicant.conf 配置文件如下:

country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="ssid"

    psk=fd105d44432233221ea8ddc60c4a2da03379fe94432c5e4c1f034b89fe0687288a16fdb4a132693fd
    priority=2 # 优先级,数字越大优先级越高
}
network={
    ssid="iphone"
psk=aa44443bc3ce7326f17b533fdcb57ac35c9914df5be8532ca70a23c153c7c6ac56dbb
    priority=1

如图所示,这里的密码可以使用命令生成

wpa_passphrase "ssid" "password"

连接

然后上电就可以连接了,密码自己登陆无线路由器查看,默认密码 raspberry

➜  ~ ssh pi@192.168.50.86
The authenticity of host '192.168.50.86 (192.168.50.86)' can't be established.
ECDSA key fingerprint is SHA256:yDNyMxc152SYJHpzidqaVtxMEVbx1NpIKAfw8GP+8Jc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.50.86' (ECDSA) to the list of known hosts.
pi@192.168.50.86's password:
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

SSH is enabled and the default password for the 'pi' user has not been changed.
This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

pi@raspberrypi:~ $
pi@raspberrypi:~ $

重置密码

pi@raspberrypi:~ $ sudo passwd pi
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

无密码登录

我一向不稀罕用密码登录,因为一麻烦 二不安全

➜  ~ ssh-copy-id pi@192.168.50.86
/usr/local/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/Users/wenjun/.ssh/id_rsa.pub"
/usr/local/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/local/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
pi@192.168.50.86's password:

Number of key(s) added:        1

Now try logging into the machine, with:   "ssh 'pi@192.168.50.86'"
and check to make sure that only the key(s) you wanted were added.

➜  ~

➜  ~ ssh pi@192.168.50.86
Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Dec  9 02:35:21 2017 from 192.168.50.32
pi@raspberrypi:~ $

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

B2B品牌管理

B2B品牌管理

(美)菲利普·科特勒、(德)弗沃德 / 楼尊 / 2008-1 / 35.00元

《B2B品牌管理》是第一本专门系统地阐述B2B品牌化的专业书籍,由营销大师菲利普•科特勒与弗沃德教授合作而成。他们以非凡的智慧和深厚的经验告诫B2B企业如何运用目标明确、重点突出的品牌化战略取得市场竞争优势地位,从而更加接近顾客,也更接近成功。在众多关于品牌的书籍中,《B2B品牌管理》的独特价值在于其根据实际环境探讨B2B品牌和品牌化问题,重点介绍和分析前沿的思想和最佳实践;通过与B2C企业的品牌......一起来看看 《B2B品牌管理》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

在线进制转换器
在线进制转换器

各进制数互转换器

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具