I am facing this problem even after trying many recommendations from this site. I am using windows 10, raspbian stretch lite(2019)/raspbian stretch(Nov2018) and I don't have a monitor. Earlier I could get through ras-pi screen using my laptop after creating 'ssh' file in root and using putty. However now I get connection refused error.
I connected raspberry pi and laptop with an Ethernet cable. Power supply to Ras-pi is done using my 5V cellphone charger. I am using raspbian stretch lite and also created a ssh file in root folder before powering up the RPi. Everything what I describe is with this setup only. Here is what all I tried.
1) deleting raspberrypi.mshome.net from putty and adding it again, same error.
2) changing ethernet's(raspberrypi's) ip from 192.168.137.66 to 192.168.137.67. putty with 'raspberrypi.mshome.net' now gives timeout error. I can not successfully ping to 'raspberrypi.mshome.net' as well. command arp-a shows new address(192.168.137.67) though and I can ping to 192.168.137.67.
3) ipconfig /release and ipconfig/renew. same error
4) My laptop's Wi-Fi ip is different(192.168.0.102) and this command 'arp-a' confirms that
5) this is strange. I removed power of ras-pi, still I was able to ping successfully 'raspberrypi.mshome.net' with 192.168.137.66 ip address through 'arp-a' command showed only my laptop's ip address(192.168.0.102). It did not show 192.168.137.66.(can this DNS 'raspberrypi.mshome.net' be removed from laptop?? I want to do it again)
6) Whenever I put 'ssh' file in boot and try to connect using putty, the 'ssh' file gets deleted, still putty gives connection refused error
7) this is one small green light. I could connect from windows command line using command "ssh pi@raspberrypi" and password. I could change default country and enable SSH using raspi-config however that is it. After that commands like "sudo apt-get -y install xrdp" does not work. I get this error. "Err:1 http://raspbian.raspberrypi.org/raspbian stretch/main armhf fonts-dejavu-core all 2.37-1 Temporary failure resolving 'raspbian.raspberrypi.org' " etc..etc..
8) My main internet connection is shared and I have ticked both the boxes. Tried to two Wi-Fi connections. Same error.
I used to be able to connect earlier with just creating 'ssh' file using putty. Pls help; let me know what else I can try out.
//some more information//
After I login using 'ssh pi@raspberrypi'
1) $ cat /etc/network/interfaces .. gives me this
# interfaces(5) file used by ifup(8) and ifdown(8) # Please note that this file is written to be used with dhcpcd # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf' # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d
2) $ ip addr .. gives me this
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:6f:56:87 brd ff:ff:ff:ff:ff:ff inet 169.254.127.248/16 brd 169.254.255.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::2059:5528:b4b2:d2df/64 scope link valid_lft forever preferred_lft forever 3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000 link/ether b8:27:eb:3a:03:d2 brd ff:ff:ff:ff:ff:ff
3) I can not ping 184.108.40.206 and I can not see an ip4 address as well in $ip addr
How can this be resolved ??