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

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #119452
    Anonymous
    Inactive

    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

    #119475
    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
    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
    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
    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)

    #120108
    herbfargus
    Member

    Or rather step 2 B-F:

    sudo nano /etc/ssh/sshd_config

    No need for all the CD and clear commands.

    #120120
    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)
  • The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.