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 from MAC stop working

    Scheduled Pinned Locked Moved Help and Support
    ssh retropiemacretro piessh connectssh wi-fi
    16 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.
    • P
      pemy
      last edited by

      Hi
      Out of the box I was able to simply ssh via mac to retropie 3 with: ssh pi@retropie using mac terminal
      (retropie is connected to my router via wifi)
      (I cant see the mounted folder on my mac via finder (as I always did, so I know that retropie is in my networks and it is working)
      (I never ever had any problem with ssh)

      Yesterday it stop working !!

      I'm after 30-40 seconds I'm getting a "time out" message from my terminal.
      I know that ssh server is running on my retropie
      I checked and I know that the port is 22
      I tried different commands:
      ssh pi@RETROPIEIP (same error)
      ssh pi@RETROPIEIP -p 22 (same error)

      In desperation I removed the ssh server software and I reinstalled it
      -I removed all the files that contains the keys
      -I checked again and I can see that ssh server is running and the port is the default 22
      -I tried again from my MAC but I still have the same error!

      I don't know anymore what to do.

      any ideas?
      Cheers
      Daniele

      jonnykeshJ 1 Reply Last reply Reply Quote 0
      • jonnykeshJ
        jonnykesh @pemy
        last edited by

        @pemy Can you ping the Pi using the MAC Network Utility?

        P 1 Reply Last reply Reply Quote 0
        • P
          pemy @jonnykesh
          last edited by

          Hi
          Yes if I >ping the retropie ip from mac terminal I get the response
          Also As I mentioned I can access retropie also normally via finder (I can see the mounted folders)
          I know that the networks works and I can ping the retriopie with out any problem.

          I think is some problem related to the SSH configuration / security settings / keys?

          Any other ideas?

          Cheers
          D

          jonnykeshJ mituM 2 Replies Last reply Reply Quote 0
          • jonnykeshJ
            jonnykesh @pemy
            last edited by

            @pemy Is it possible that the IP address has changed and you haven't realised? Maybe Finder is using the hostname to connect rather than IP and therefore will still connect if it changes.
            Have you tried stopping and restarting the ssh service on the Pi? Do you have another device you can try connecting with, a phone, tablet or other computer?
            Just trying a few obvious things and I have never really used a MAC much so I can't really help you out as the issue seems to be on that end.

            P 1 Reply Last reply Reply Quote 0
            • mituM
              mitu Global Moderator @pemy
              last edited by

              @pemy Did you configure any firewall on the PI ? Or on the MAC - can you SSH to another system, besides the PI ?

              1 Reply Last reply Reply Quote 0
              • P
                pemy @jonnykesh
                last edited by

                @jonnykesh
                I did stop and start ssh
                I did also remove the ssh and reinstall it
                the IP on the retropie is changed but I know the ip and even if I try to runfrom my mac:
                ssh pi@RETROPIEIP (same error)
                or
                ssh pi@RETROPIEIP -p 22 (same error)

                @mitu I didn't configure any firewall on the retropie
                I didn't change any firewall configuration on my mac or my networks
                (ssh just worked few days ago and now is not working)
                the only thing that changed is probably the IP address on the retropie and my mac
                but that is normal with a dhcp system

                I'm not an expert on ssh (that is why I asked help) my intuition is that is something with the keys
                maybe the keys stored the hashing of the IP addresses and now that has change the key are invalid or something similar ???

                That is why I deleted the keys on my retropie (but still it is not working)
                Myabe I need to delete the keys on my mac as well?

                D

                jonnykeshJ mituM 2 Replies Last reply Reply Quote 0
                • jonnykeshJ
                  jonnykesh @pemy
                  last edited by

                  @pemy Try deleting the known_hosts file in /home/pi/.ssh/

                  P 2 Replies Last reply Reply Quote 0
                  • mituM
                    mitu Global Moderator @pemy
                    last edited by mitu

                    @pemy said in SSH from MAC stop working:
                    Use telnet RETROPIEIP 22 and see if you get the SSH banner, you should get get something like

                    Trying RETROPIEIP...
                    Connected to RETROPIEIP.
                    Escape character is '^]'.
                    SSH-2.0-OpenSSH_7.4
                    

                    If you don't get that, then there's something in your network blocking the connection.

                    If you run ssh localhost from the PI system, do you get a login prompt ?

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pemy @jonnykesh
                      last edited by

                      @jonnykesh
                      ok thanks
                      I didn't try that ... I will as soon as possible
                      Do I need to remove it from my mac? my retropie> or both?

                      Cheers
                      D

                      1 Reply Last reply Reply Quote 0
                      • P
                        pemy @mitu
                        last edited by pemy

                        @mitu
                        tenet from my PI (command not found)
                        i did try ssh localhost command from my PI
                        I'm getting :
                        "
                        authenticity of host localhost can't be established
                        continue with connection?
                        "
                        I type: yes
                        and after that I'm getting:
                        permanently added localhost to the list of known host

                        1 Reply Last reply Reply Quote 0
                        • P
                          pemy @jonnykesh
                          last edited by

                          @jonnykesh
                          I removed know_host from my mac as well
                          I still have the same problem

                          P 1 Reply Last reply Reply Quote 0
                          • P
                            pemy @pemy
                            last edited by

                            @pemy
                            ok guys
                            find a solution thanks to you
                            After removing the known_hosts from my mac (not from my pi)
                            I used this command
                            ssh pi@mypiIPaddress
                            and I'm getting from my mac terminal:
                            The authenticity of host '192.168.0.26 (192.168.0.26)' can't be established.
                            ECDSA key fingerprint is : "myfingerprinthashnumber"
                            Are you sure you want to continue connecting (yes/no)? yes

                            and now I'm IN!!

                            2 problems / questions

                            if I try using the normal
                            ssh pi@retropie
                            it is not working whyyyyyy?? :)

                            also:
                            the problem is how to solve this issue with a dhcp server that change IP address all the time ?

                            I think I'm getting this problem because the ssh security system takes into account my the IP of my mac (as identifier ??) so if I change the ip on the mac the ssh stop my mac to connect to retropie?
                            is that the reason?

                            caver01C mituM 2 Replies Last reply Reply Quote 0
                            • caver01C
                              caver01 @pemy
                              last edited by

                              @pemy You may run into challenges using just a name like that, as names over IP typically need to be resolved via DNS. You might try ssh pi@retropie.local which seems to work consistently for me. Adding .local when trying to access machines on my local network from the Mac has worked for many devices on my network over the years.

                              My 4-player cocktail style cabinet built as a custom "roadcase"

                              P 1 Reply Last reply Reply Quote 0
                              • P
                                pemy @caver01
                                last edited by

                                @caver01 you are right
                                using local works out of the box (now)
                                thanks

                                1 Reply Last reply Reply Quote 0
                                • mituM
                                  mitu Global Moderator @pemy
                                  last edited by

                                  @pemy said in SSH from MAC stop working:

                                  I think I'm getting this problem because the ssh security system takes into account my the IP of my mac (as identifier ??) so if I change the ip on the mac the ssh stop my mac to connect to retropie?

                                  No, the message you got is because the IP address of the RetroPie has changed. This message appears every time you connect to a new IP address/Host and the (IP/Host, SSH Host Key) pair is different than what is recorded in ~/.ssh/known_hosts.

                                  caver01C 1 Reply Last reply Reply Quote 0
                                  • caver01C
                                    caver01 @mitu
                                    last edited by

                                    @mitu in this case he got the message because he deleted known_hosts on our recommendation.

                                    My 4-player cocktail style cabinet built as a custom "roadcase"

                                    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.