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

    Root Password prevents SSH and WinSCP

    Scheduled Pinned Locked Moved Help and Support
    sshroot
    8 Posts 4 Posters 9.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.
    • KvitekvistK
      Kvitekvist
      last edited by

      So, I just added a root password (as a step to install games through dosbox), and right after, I can no longer connect through SSH or WinSCP. Error message = "Connection Refused".

      I followed these steps to the point: The root password is disabled by default (as is the case for Raspbian and many other linux distros).

      before setting a root password, the following must be edited
      sudo nano /etc/ssh/sshd_config
      look for
      PermitRootLogin without-password
      change it to
      PermitRootLogin yes
      then ctrl+x to save,
      next set your root password:
      sudo passwd root
      restart your Pi to register your changes

      And now SSH wont work. In putty i do as normal, put in "retropie" or IP, and neither work. I do not make it to the terminal where I can log in as "pi" with password "raspberry".

      Can I from inside the Pi, disable the dassword again, or better, is there a way to keep the changes and still access the Pi through SSH?

      I am running retropie 4.0.2 with Pi model 2 B.

      meleuM PokeEngineerP 2 Replies Last reply Reply Quote 0
      • meleuM
        meleu @Kvitekvist
        last edited by meleu

        @Kvitekvist if you log in as pi you can become root with the following command:

        sudo su
        

        I think it's easier than all those configs...

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        1 Reply Last reply Reply Quote 0
        • N
          Nightfire
          last edited by

          To change the root password:
          sudo passwd

          To change your user password:
          passwd

          To change other users password:
          sudo passwd USERNAME

          Double-check your Pi's IP address if it's on DHCP

          You can do like @meleu suggested and just login as the 'pi' user and elevate privileges from there

          1 Reply Last reply Reply Quote 0
          • PokeEngineerP
            PokeEngineer @Kvitekvist
            last edited by PokeEngineer

            Edited this post out because frankly, it wasn't helpful.

            Don't sweat it.
            When in doubt, take a BYTE out of life.

            😎

            1 Reply Last reply Reply Quote 0
            • KvitekvistK
              Kvitekvist
              last edited by

              @Nightfire I am very new to the Rpi, so please explain how I can access the command line within the Pi, as I cannot access it from SSH?

              meleuM 1 Reply Last reply Reply Quote 0
              • meleuM
                meleu @Kvitekvist
                last edited by

                @Kvitekvist said in Root Password prevents SSH and WinSCP:

                how I can access the command line within the Pi, as I cannot access it from SSH?

                USB keyboard. You can try undo the changes you made in /etc/ssh/sshd_config and maybe it will give you the SSH back.

                • Useful topics
                • joystick-selection tool
                • rpie-art tool
                • achievements I made
                KvitekvistK 1 Reply Last reply Reply Quote 0
                • KvitekvistK
                  Kvitekvist @meleu
                  last edited by

                  @meleu So, press F4 + Any key, then: sudo nano /etc/ssh/sshd_config to undo the changes i did? Is this the right steps to get there?

                  meleuM 1 Reply Last reply Reply Quote 1
                  • meleuM
                    meleu @Kvitekvist
                    last edited by

                    @Kvitekvist said in Root Password prevents SSH and WinSCP:

                    @meleu So, press F4 + Any key, then: sudo nano /etc/ssh/sshd_config to undo the changes i did? Is this the right steps to get there?

                    I'm not sure if this was the only change you have made, but it seems the right thing to do.

                    BTW: Pressing F4 only is enough to exit emulationstation.

                    • Useful topics
                    • joystick-selection tool
                    • rpie-art tool
                    • achievements I made
                    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.