up one level
How to SSH into Raspberry Pi Including Overcoming Network error Connection refused Message
By author Morgan Jassen
• Dell XPS 15 9560 laptop [Windows 10 (Microsoft Windows Version 1803)]
• Raspberry Pi Model B+ [Raspberry PI Raspbian GNU/Linux 9 (stretch)]
• PuTTY Release 0.70
This post covers how to SSH into Raspberry Pi, including overcoming a message like: "Network error: Connection refused".
First, we plug the Raspberry Pi device into power and into network. This Raspberry Pi device has just been flashed with a fresh image of Raspbian Linux OS. (I.e. using: https://www.raspberrypi.org/documentation/installation/installing-images/
Next, we launch PuTTY and tell it to connect to what we know to be the Raspberry Pi's IP address (10.0.0.19 in our case)
哦!Oh! PuTTY gives a message like: "PuTTY Fatal Error ... ❌ Network error: Connection refused ... OK"
Next, we try to ping the device, as a sanity check. Hmmm... we can ping the device at that IP. Thus it's something else -- possible SSH is blocked or disabled.
Next we research and find that on fresh Raspbian config, ssh is disabled by default, but that writing a file with the name of "ssh" onto the boot partition will tell cause the device to become booted with ssh enabled upon the next boot. (See https://www.raspberrypi.org/documentation/remote-access/ssh/) So that's what we do.
Next, we try connecting to the Pi via PuTTY (again, as in step "2.)" above). This time we see a different message like "...If you trust this host, hit Yes to add the key to PuTTY's cache and carry on connecting. ..." Woo hoo! looks like we got to the next step and will be prompted to log in!
Next, we are indeed prompted to log in as "firstname.lastname@example.org" which is expected in this case. We enter the default password ("raspberry" in this case) and we see the '...pi@raspberypi:~ $ ...' prompt. We're in!
In conclusion, this post has covered how to SSH into Raspberry Pi, including overcoming a message like: "Network error: Connection refused".
This blog post first published 2019-06-03 at https://wieldgadget.com/2019/2019-06-02-ssh-to-raspberry-pi
[2018-07-17 Note: This blog post was republished on 2018-07-17 at https://investorworker.com/2019/2019-06-02-ssh-to-raspberry-pi.html ]