SSH Error: Permission denied (publickey)
lolkthxbai last edited by
Raspberry Pi 4B (4GB)
Terminal (MacOS BigSur 11.1)
Any one have any ideas what may be the problem?
I cloned an image of my raspberry pi. When I try to connect to to cloned card on a different raspberry pi via SSH I get this warning
The authenticity of host 'retropie (##.##.###.###)' can't be established. ECDSA key fingerprint is SHA256:****************/****************/**** Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'retropie,##.###.###.###' (ECDSA) to the list of known hosts. pi@retropie: Permission denied (publickey).
If I use the IP address of the raspberry pi on my local network instead of the hostname, it works as expected:
ssh email@example.com firstname.lastname@example.org's password: Linux retropie 5.4.83-v7l+ #1379 SMP Mon Dec 14 13:11:54 GMT 2020 armv7l
.***. Monday, 18 January 2021, 01:46:36 AM ***** Linux 5.4.83-v7l+ armv7l GNU/Linux `***' |*| Filesystem Size Used Avail Use% Mounted on |*| /dev/root 59G 22G 35G 38% / ..|*|.. Uptime.............: 0 days, 00h04m20s .*** * ***. Memory.............: 3544276kB (Free) / 3919796kB (Total) *******@@** Running Processes..: 134 `*****@@**' IP Address.........: 192.168.1.124 `*******' Temperature........: CPU: 40°C/104°F GPU: 41°C/105°F `"""' The RetroPie Project, https://retropie.org.uk pi@retropie:~ $
Do you have any custom
@lolkthxbai and also check
/var/log/auth.logon the remote system (via terminal / keyboard of course if you can't connect)
Lolonois last edited by
Is this solved already?
If not: I would run
ssh -v pi@<address>, it should give you a hint.
If you are still puzzled: Mount the SD card of the clone in your Mac, look for a file
/etc/hostname. Edit the file and change the hostname to something different e.g
rpi-clone. Boot your Rpi with this SD card and try SSH'ing again.