4

I was trying to setup a ssh connection to my pi 2 (model B, i.e., no inbuilt wifi) in headless mode from my ubuntu machine. I do not have a router. After multiple attempts of flashing and tweaking, the following worked,

  1. Add ssh file in /boot
  2. Uncommenting the following lines in /etc/dhcpcd.conf
profile static_eth0
static ip_address=192.168.1.23/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1

interface eth0 fallback static_eth0

After this it asks for

pi@192.168.1.23's password:

to which i supplied the default password for rpi

raspberry

but it keeps saying Permission denied, please try again.for three times after which it closes the connection. I tried this and this, but it would not work. Note that I do not have a windows machine or a hdmi-in enabled screen. I don't remember having this problem in earlier versions of raspbian. I am using 2018-11-13-raspbian-stretch-full.img.

REVOLUTION
  • 61
  • 1
  • 4

2 Answers2

2

When I did,

$ssh pi@192.168.1.23

after making my IP static, pi gave the following,

pi@192.168.1.23's password:

Which was misleading, as no user 192.168.1.23 exists. Hence it kept showing Permission Denied. It would ask passwords for this user, even when I had disabled passwords.

Finally, after restarting my computer and re-flashing the OS on the SD card, I was able to get it working without static IP. And the standard command worked,

$ssh pi@raspberrypi.local

I figured that DHCP must have been misbehaving on my computer as I kept switching my ethernet port from RPI to LAN. After restarting it must have got reset.

REVOLUTION
  • 61
  • 1
  • 4
0

No more default pi user with raspberry password.

https://www.raspberrypi.com/news/raspberry-pi-bullseye-update-april-2022/