Greetings to the community!
I am struggling establishing an ssh connection from laptop (Windows 10) to my pi connected to it through an Ethernet cable (raspberry pi 3 model B+).
The process I am following is the above one:
1) Flashing an image (more specifically, this one) to my SD card
2) Go to the /etc/network/interfaces file of the image and added the following lines of code
auto eth0
iface eth0 inet dhcp
so that my pi takes a dynamic ip from the dhcp.
3) Add the SD card in my pi, connect my pi through Ethernet cable into my laptop and boot (Network Sharing is enabled in Windows options)
4) Get the static IP(192.168.137.85) of my pi assigned to it and connect to it through SSH using Putty successfully
So far so good....
Unfortunately, if I reboot my pi (unplugged it or whatever - of course after I have previously ended the SSH connection) and I try again to establish an SSH connection with it, it fails.
The workaround currently is repeat the procedure above(flash again the image etc.), but this is not a real solution..
Any idea what could possibly be the reason for the failed ssh connection after the pi reboot? Thanks in advance
/etc/network/interfaces
hasn't been used to configure network settings for some time/etc/network/interface
isn't used on an unmodified Raspbian image. Using it will disable defaultdhcpcd
networking.