RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    SSH Error: Permission denied (publickey)

    Scheduled Pinned Locked Moved Help and Support
    sshterminalmacospermissiondenied
    4 Posts 4 Posters 3.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      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 pi@192.168.1.124
      pi@192.168.1.124'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:~ $ 
      
      BuZzB 1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        Do you have any custom ssh configuration in $HOME/.ssh/config ?

        1 Reply Last reply Reply Quote 0
        • BuZzB
          BuZz administrators @lolkthxbai
          last edited by

          @lolkthxbai and also check /var/log/auth.log on the remote system (via terminal / keyboard of course if you can't connect)

          To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

          1 Reply Last reply Reply Quote 0
          • LolonoisL
            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.

            HTH

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

            Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.