ssh - 连接被拒绝 : ssh to headless Raspberry Pi 3 b+

标签 ssh raspberry-pi raspbian

我已经下载了 raspbian lite 并通过 eclipse 刻器将其刷新到 SD 卡

根据 raspbian 的 headless ssh 教程,我在/boot 中创建了一个空的 ssh 文件
touch /Volumes/boot/ssh
然后我将以太网电缆从 pi 连接到苹果机场极端

当 pi 启动时,macbook 上的机场实用程序将 10.0.1.9 显示为网络上的新设备

来自 MacBook:
$ ssh -vvv pi@10.0.1.9 OpenSSH_7.8p1, LibreSSL 2.6.2 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: resolve_canonicalize: hostname 10.0.1.9 is address debug2: ssh_connect_direct debug1: Connecting to 10.0.1.9 [10.0.1.9] port 22. debug1: connect to address 10.0.1.9 port 22: Connection refused ssh: connect to host 10.0.1.9 port 22: Connection refused
我已经多次这样做了,在每次启动时重新创建 ssh 文件,重新下载并重新刷新 raspbian 镜像,它总是失败。
我 100% 确定 10.0.1.9 是 pi 的本地 ip,因为我已经尝试了大约 10 次,它只在 pi 开启并插入以太网时出现

最佳答案

运行这些命令以生成 ssh 远程访问所需的 key 。

sudo rm -r/etc/ssh/ssh*key

sudo dpkg-reconfigure openssh-server

关于ssh - 连接被拒绝 : ssh to headless Raspberry Pi 3 b+,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55931557/

相关文章:

linux - TinyX 使用内置的 fbtft 触摸屏驱动程序显示显示,但触摸不起作用

c++ - 用于端口转发的 libssh2 示例代码

ssh - 在对 awk 的 ssh 远程调用中转义感叹号?

ubuntu - 使用需要 sudo 权限的 VS Code ssh 工具编辑文件

raspberry-pi - 在 Raspberry Pi 上运行 Docker 时启动容器时常失败

python - Raspberry Pi 3B 和 RFID RC522 - Python TypeError

python - 致命的 python 错误 : (pygame parachute) Segmentation Fault

Python 脚本作为服务无法访问 asoundrc 配置文件