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 Only works as a guest [SOLVED]

    Scheduled Pinned Locked Moved Help and Support
    sshguestuserremote access
    39 Posts 3 Posters 5.9k 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.
    • ClydeC
      Clyde @ChasKa04
      last edited by Clyde

      @chaska04 Try to use ssh with the -v option (= verbose) to get a more detailed output.

      ssh -v pi@retropies_network_address
      

      You can expand the output even further with -vvand -vvv. If you post the output here, please use a code block, but make sure to anonymize any compromising information in the text.

      edit: This command is meant to be entered on the system that tries to connect to the pi, not on the pi itself. You'll have to change "retropies_network_address" to, you guessed it, your Retropie's network address. ;)

      ChasKa04C 1 Reply Last reply Reply Quote 0
      • ChasKa04C
        ChasKa04 @Clyde
        last edited by

        @clyde
        I typed in your command on my windows pc and the output was a failure

        'ssh' is not recognized as an internal or external command,
        operable program or batch file.
        
        mituM 1 Reply Last reply Reply Quote 0
        • mituM
          mitu Global Moderator @ChasKa04
          last edited by

          @chaska04 Windows does not have SSH built it, you need to download a SSH client for windows - Putty is the most used and it's open source.

          ChasKa04C 1 Reply Last reply Reply Quote 0
          • ChasKa04C
            ChasKa04 @mitu
            last edited by

            @mitu
            How do I type in the command that @Clyde send me on PuTTY?

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

              @chaska04 https://www.ssh.com/ssh/putty/putty-manuals/0.68/Chapter3.html#using-cmdline

              ChasKa04C 1 Reply Last reply Reply Quote 0
              • ChasKa04C
                ChasKa04 @mitu
                last edited by

                @mitu Could I just run the command on a Mac?

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

                  @chaska04 said in SSH Only works as a guest:

                  Could I just run the command on a Mac ?

                  Sure, macOS has ssh built it, just run the command @Clyde suggested from a terminal window.

                  ChasKa04C 1 Reply Last reply Reply Quote 0
                  • ChasKa04C
                    ChasKa04 @mitu
                    last edited by

                    @mitu My SUCCESSFUL output was:

                    OpenSSH_7.6p1, LibreSSL 2.6.2
                    debug1: Reading configuration data /etc/ssh/ssh_config
                    debug1: /etc/ssh/ssh_config line 48: Applying options for *
                    debug1: Connecting to <MyIp> port 22.
                    debug1: Connection established.
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_rsa type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_rsa-cert type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_dsa type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_dsa-cert type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_ecdsa type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_ecdsa-cert type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_ed25519 type -1
                    debug1: key_load_public: No such file or directory
                    debug1: identity file /Users/Steve/.ssh/id_ed25519-cert type -1
                    debug1: Local version string SSH-2.0-OpenSSH_7.6
                    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.7p1 Raspbian-5+deb8u3
                    debug1: match: OpenSSH_6.7p1 Raspbian-5+deb8u3 pat OpenSSH* compat 0x04000000
                    debug1: Authenticating to <MyIp>:22 as 'pi'
                    debug1: SSH2_MSG_KEXINIT sent
                    Connection closed by <MyIp> port 22
                    ``
                    ClydeC 1 Reply Last reply Reply Quote 0
                    • ClydeC
                      Clyde @ChasKa04
                      last edited by

                      @chaska04 With successful you don't mean a working connection, I presume? Because the connection seems to have been closed right after the start of the key exchange. Normally the debug1: SSH2_MSG_KEXINIT sent is followed by a debug1: SSH2_MSG_KEXINIT received and more messages about the key exchange.

                      Can you read the log file /var/log/auth.log from Retropie and show us the lines with timestamps that correspond with your connection attempt?

                      Does ssh show more than

                      debug1: SSH2_MSG_KEXINIT sent
                      Connection closed by <MyIp> port 22
                      

                      if used with -vv or -vvv?

                      By the way, I'm not an expert in ssh or networking, I'm just trying to collect more information for people who are. So if anyone here with more knowledge wants to step in, be welcome. :)

                      1 Reply Last reply Reply Quote 0
                      • ChasKa04C
                        ChasKa04
                        last edited by

                        When I meant successful I was referencing to when it didn't work on my PC. Because Termin Doesn't have SSH built in!

                        ClydeC 1 Reply Last reply Reply Quote 0
                        • ClydeC
                          Clyde @ChasKa04
                          last edited by

                          @chaska04 I thought as much, but it's better to know for sure. You can display the contents of /var/log/auth.log with this command on the Retropie terminal console:

                          cat /var/log/auth.log
                          
                          ChasKa04C 1 Reply Last reply Reply Quote 0
                          • ChasKa04C
                            ChasKa04 @Clyde
                            last edited by

                            @clyde When I run this command it displays a long output which is impossible to manually copy. Is there a certain part I should Copy.

                            ChasKa04C 1 Reply Last reply Reply Quote 0
                            • ChasKa04C
                              ChasKa04 @ChasKa04
                              last edited by

                              @chaska04 Ohhh, you want me to copy the time that I ran the first command on the mac.

                              1 Reply Last reply Reply Quote 0
                              • ChasKa04C
                                ChasKa04
                                last edited by ChasKa04

                                Jan 28 10:38:39 retropie sshd(990]: error: key_load_public: invalid format 
                                Jan 28 10:38:39 retropie sshd[990]: error: Could not load host key: /etc/ssh/ssh_host_rsa_key
                                Jan 28 10:38:39 retropie sshd[990]: error: key_load_public: invalid format 
                                Jan 28 10:38:39 retropie sshd(990]: error: Could not load host key: /etr_zsshzssh_host_dsa_key
                                Jan 28 10:38:39 retropie sshd[990]: error: key_load_public: invalid format 
                                Jan 28 10:38:39 retropie sshd[990]: error: Could not load host key: /etc/ssh/ssh_host_ecdsa_key
                                Jan 28 10:38:39 retropie sshd(990]: error: key_load_public: invalid format
                                Jan 28 10:38:39 retropie sshd[990]: error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
                                Jan 28 10:38:39 retropie sshd[990]: fatal: Mo supported key exchange algorithms Epreauth]
                                Jan 28 11:17:01 retropie CRON[1051] : pan_unix(cron:session): session opened for user root by (uid=0)
                                Jan 28 11:17:01 retropie CRON[1051] : pan_unix(cron:session): session closed for user root 
                                

                                I used an OCR so The spelling may be a bit "iffy".

                                iffy
                                full of uncertainty; doubtful.
                                "the prospect for classes resuming next Wednesday seems iffy"
                                synonyms: tentative, undecided, unsettled, unsure, unreliable, unresolved, in doubt, in the balance; informalup in the air
                                "that date is a bit iffy"

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

                                  @chaska04 You ssh server on the retropie is broken - how did you install the system ?
                                  Try reinstalling ssh on the retropie:

                                  sudo apt-get install --reinstall openssh-server
                                  
                                  ChasKa04C 1 Reply Last reply Reply Quote 0
                                  • ChasKa04C
                                    ChasKa04 @mitu
                                    last edited by

                                    @mitu I installed it with an image from retropie website. In late 2017. Trying the command now.

                                    ChasKa04C 1 Reply Last reply Reply Quote 0
                                    • ChasKa04C
                                      ChasKa04 @ChasKa04
                                      last edited by ChasKa04

                                      @chaska04 Sorry, No Luck. I ran the command and re-installed then rebooted.

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

                                        @chaska04 Then try a complete uninstall then install again

                                        dpkg -P openssh-server
                                        apt-get install -y openssh-server
                                        
                                        ChasKa04C 2 Replies Last reply Reply Quote 0
                                        • ChasKa04C
                                          ChasKa04 @mitu
                                          last edited by

                                          @mitu Ok

                                          1 Reply Last reply Reply Quote 0
                                          • ChasKa04C
                                            ChasKa04 @mitu
                                            last edited by

                                            @mitu It says the operation requires SuperUser Privilege.

                                            mituM 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.