Cannot ssh to raspberry after enabling root password

Home Forums RetroPie Project Everything else related to the RetroPie Project Cannot ssh to raspberry after enabling root password

RetroPie has a new website and forum. Please visit https://retropie.org.uk/ for the new site. The new forum is located at https://retropie.org.uk/forum/. This forum is left here as a read-only archive.

This topic contains 5 replies, has 5 voices, and was last updated by Profile photo of smileybob smileybob 1 year ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #119452
    Profile photo of jackie
    jackie
    Participant

    Hi,

    I just enabled the root password to my Retropie, following these instructions:
    https://github.com/RetroPie/RetroPie-Setup/wiki/FAQ#why-cant-i-ssh-as-root-anymore

    My problem is that now I cannot ssh to my Pi anymore using putty, I am not even asked for a password, simply “connection refused” before I can enter any password.

    in the raspi-config, ssh is enabled!

    How do I disable the root password again? When I do sudo passwd root, I cannot enter an empty password.

    And how can I make SSH work for any user, i.e. pi and root?

    Edit:
    even when I try locally on my raspberry to
    ssh pi@localhost, I get a “connection refused” error message

    • This topic was modified 1 year ago by Profile photo of jackie jackie.

    #119475
    Profile photo of shoothere
    shoothere
    Participant

    Hmmm sounds like the SSH setting is borked.

    Is going for a fresh install an option?

    One would not need to run as root, ever with the sudo command.

    #119610
    Profile photo of meneerjansen
    meneerjansen
    Participant

    Are you trying to log in your Pi via SSH as ‘root’ or as user ‘pi’? Generally you shouldn’t have to set a root passwd (like Shoothere above said: use ‘sudo’), but if you did it shouldn’t generally be a problem. But how that is w/ Retropie and the Debian distribution on which it is based might be changed recently (I wouln’t know why, but hey).

    Anyway, I would try to log in w/ the following command:
    ssh pi@192.168.0.XXX
    where 192.168.0.XXX is the IP address of your Pi on your (local area) network (see your router for said IP address). Could you copy/paste the error message of the command above?

    #120094
    Profile photo of smileybob
    smileybob
    Participant

    1. load retropie image onto the raspberry pi.

    2.a) quit into the command prompt on the pi.
    b) Type cd .. (type this a few times until your are at the root)
    c) Type clear
    d) Type cd /etc/ssh/
    e) Type clear
    f) Type sudo nano sshd_config
    f) the cursor will be at the top, use the curor keys and then locate and change PermitRootLogin without-password. TO PermitRootLogin yes. then hold ctrl and O. the ctrl X.
    g) sudo passwd root. (Enter new password. Type exit)

    • This reply was modified 1 year ago by Profile photo of smileybob smileybob.
    #120108
    Profile photo of herbfargus
    herbfargus
    Moderator

    Or rather step 2 B-F:

    sudo nano /etc/ssh/sshd_config

    No need for all the CD and clear commands.

    #120120
    Profile photo of smileybob
    smileybob
    Participant

    The set of commands I pasted from my own written instructions i keep on my PC. The clear command was there so that the screen would be clean and the cursor would be at the top of the screen ready for editing sshd_config.
    Hope these instructions help people 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

Forums are currently read only - please visit the new RetroPie forums at https://retropie.org.uk/forums/

Skip to toolbar