简体   繁体   English

拒绝连接:SSH到无头Raspberry Pi 3 b +

[英]Connection Refused: ssh to headless Raspberry Pi 3 b+

I have downloaded raspbian lite and flashed it to SD card through etcher 我已经下载了raspbian lite,并通过蚀刻机将其闪存到SD卡中

As per raspbian's headless ssh tutorial, I created an empty ssh file in /boot 按照raspbian的无头ssh教程,我在/ boot中创建了一个空的ssh文件

touch /Volumes/boot/ssh

Then I connected ethernet cable from pi into apple airport extreme 然后我将以太网电缆从pi连接到Apple Airport Extreme

when pi is booted, airport utility on macbook shows 10.0.1.9 as a new device on the network 引导pi时,macbook上的airport utility将10.0.1.9显示为网络上的新设备

from macbook: 从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

I've done this multiple times, recreating the ssh file at each boot, redownloading and reflashing the raspbian image, it always fails. 我已经做了多次,每次启动时都重新创建ssh文件,重新下载并刷新了raspbian映像,但它总是失败。 I'm 100% certain of 10.0.1.9 being the pi's local ip because i've attempted this around 10 times and it only appears when pi is on and ethernet is plugged in 我100%确信10.0.1.9是pi的本地ip,因为我已经尝试了10次左右,并且仅在pi接通且插入以太网时才会出现

Run these command to generate the needed keys for ssh remote access. 运行以下命令以生成ssh远程访问所需的密钥。

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

sudo dpkg-reconfigure openssh-server 须藤dpkg重新配置openssh服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM