macOS 如何通过 SSH 访问树莓派 All In One
macOS 如何通过 SSH 访问树莓派 All In One
SSH + hostname.local
前置条件:
- 树莓派之前已经配置过 WI-FI 信息
- Mac 与 树莓派都连接到同一个 WIFI 中
默认主机名: raspberrypi
默认用户名: pi
默认密码: raspberry
# 使用 hostname.local 通过 SSH 连接访问树莓派
$ ssh pi@raspberry.local
主机名: rpi3b
用户名: pi
密码: raspberry
# 使用 hostname.local 通过 SSH 连接访问树莓派 3B
$ ssh pi@rpi3b.local
主机名: rpi4b
用户名: eric
密码: *******
# 使用 hostname.local 通过 SSH 连接访问树莓派 4B
$ ssh eric@rpi4b.local
local DNS
mDNS
=> multicast DNS / 组播 DNS
https://zzk.cnblogs.com/my/s/blogpost-p?Keywords=mDNS
SSH + IP Address
前置条件:
- 树莓派之前已经配置过 WI-FI 信息
- Mac 与 树莓派都连接到同一个 WIFI 中
- 通过路由器管理页面查询到树莓派 IP Address / 通过
NMAP
扫描 IP 和端口号查询到树莓派 IP Address
默认主机名: raspberrypi
默认用户名: pi
默认密码: raspberry
# 使用 IP 通过 SSH 链接树莓派
$ ssh pi@192.168.18.135
The authenticity of host '192.168.18.135 (192.168.18.135)' can't be established.
![image](https://img2023.cnblogs.com/blog/740516/202303/740516-20230329002140042-1135857541.png)
t is SHA256:Di2Heo/SSlJovttnBVkRFZaD0euMis9KDduUW1+u4JU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.18.135' (ED25519) to the list of known hosts.
pi@192.168.18.135's password:
Linux raspberrypi 4.19.118-v7+ #1311 SMP Mon Apr 27 14:21:24 BST 2020 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: Tue Mar 28 23:32:35 2023
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:~ $ whoami
pi
pi@raspberrypi:~ $ pwd
/home/pi
pi@raspberrypi:~ $
配置静态 IP地址
wpa_supplicant.conf
$ cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CN
network={
ssid="1001"
psk="wf123456"
key_mgmt=WPA-PSK
}
https://www.cnblogs.com/xgqfrms/p/11120764.html
Raspberry Pi 设置静态 IP All In One
https://www.cnblogs.com/xgqfrms/p/11120764.html
https://www.cnblogs.com/xgqfrms/tag/树莓派/
WIFI 查找树莓派 IP
SFTP 文件传输
FileZilla
FTP 端口号: 22
✅
# SFTP / FTP
$ sftp://192.168.18.135:22@pi -p
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
cnblogs tags
bug IP
❌
tags: ["macOS", "树莓派", "IP", "WIFI", "Raspberry Pi3", "SSH"]
https://i.cnblogs.com/api/posts
{
"errors": [
"系统发生了错误。联系邮箱:contact@cnblogs.com"
],
"type": 5
}
系统发生了错误。联系邮箱:contact@cnblogs.com
demos
(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!
refs
How to use macOS to connect to Raspberry Pi without the monitor All In One
https://www.cnblogs.com/xgqfrms/p/16478328.html
https://www.cnblogs.com/xgqfrms/p/16481735.html
©xgqfrms 2012-2021
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/17267344.html
未经授权禁止转载,违者必究!