I want to use my RPi 3 completely headless with wifi using Raspbian - I don't have neither a USB keyboard nor a monitor. I modified the following two files on the ext4 partition of my SD card.
The content of /etc/wpa_supplicant/wpa_supplicant.conf
:
country=GB
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="XXXX"
psk="YYYY"
}
I add the the following lines to /etc/dhcpcd.conf
:
interface wlan0
static ip_address=192.168.0.200/22
static routers=192.168.0.1
static domain_name_servers=192.168.0.1
And finally I added an empty ssh
file to the boot
partition. I've tried to ping the RPi and it seems to be online:
PING 192.168.0.200 (192.168.0.200) 56(84) bytes of data.
64 bytes from 192.168.0.200: icmp_seq=1 ttl=64 time=67.4 ms
64 bytes from 192.168.0.200: icmp_seq=2 ttl=64 time=5.59 ms
64 bytes from 192.168.0.200: icmp_seq=3 ttl=64 time=8.87 ms
64 bytes from 192.168.0.200: icmp_seq=4 ttl=64 time=9.06 ms
64 bytes from 192.168.0.200: icmp_seq=5 ttl=64 time=6.35 ms
64 bytes from 192.168.0.200: icmp_seq=6 ttl=64 time=6.65 ms
--- 192.168.0.200 ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5005ms
rtt min/avg/max/mdev = 5.595/17.337/67.491/22.466 ms
But the command ssh [email protected]
gives me an error:
ssh: connect to host 192.168.0.200 port 22: Connection refused
Do you have any idea why I can't ssh into my RPi?
ssh
file in the boot partition or accidentally in the boot folder on the other partition?