The KiwiSDR 2 online store is open for orders! Please visit kiwisdr.nz

Cannot ssh as root to new BBAI installation [Debian 9/10 fixes mentioned here]

edited March 2023 in BeagleBone AI

New installation working OK now on AI, but after the Kiwisdr clone and make / install I cannot log into port 22 with ssh, all passwords I've tried with root as the user fail. Using the console on the Kiwi admin page, I was able to change the root password to a 4 letter short password, but still no go logging in via ssh even after power cycle / reboot. Via Putty, I'm using root as the user, and my short password.

I ran into an issue on Ubuntu on an Atomic Pi with disallowed short passwords, so I also tried setting an 8 letter password with a one cap letter, 3 lower case and 4 numbers. Still no luck logging in using Putty in as root. Also tried the board serial number as password. I have two other Kiwi's set up with BBG's and I can log into those with root, and the short password I set via the console no problem. Is there something new with BBAI's that prevents root logins? Note that my kernel was updated - see other post on BBAI discussions today for details on that. SSH worked fine with debian / temppwd before I did the final Kiwi git clone make and install, just can't log in now that I have the BBAI running KiwiSDR.

Comments

  • jksjks
    edited March 2023

    I might be wrong, but I believe with later Debian versions you cannot ssh login as root at all without going through some complicated reconfiguration of various access control files.

    Instead, what I do for all my local Kiwis, regardless of Debian version, is to set an ssh key in /root/.ssh/authorized_keys generated with ssh-keygen for root logins from my laptop. That way I never have to give a root password for ssh, scp, rsync or anything else (I do lots of non-ssh stuff requiring root access). You'll have to research the exact details (ssh, ssh-keygen man pages).

    You obviously have to setup the authorized_keys file the first time with a ssh login using debian/temppwd and sudo su to place the file.

  • edited September 2022

    @wayne Hello, if you want permit root login for ssh (if you don't like use "sudo su", but accept all security risks) you will need to change sshd config file and restart this daemon:

    sudo nano /etc/ssh/sshd_config

    fined string "PermitRootLogin no" and type "yes"

    PermitRootLogin yes

    Save file and restart ssh

    sudo service ssh restart

    Hope it was helpful.

  • edited September 2022

    Now that I'm effectively locked out from the OS using ssh, can either the key file or change of sshd_config be done using the console?

  • edited September 2022

    @wayne But why you can't connect from Putty like "debian" user? And after that "sudo su" will give you same root right...

  • edited September 2022

    Can't log in via putty, connection refused using root as user. Unable to make passwd work via kiwi console. Is there another way to create a non-root account via the console then log in and do a sudo? Debian temppwd doesn't work either via putty

  • You try serial number your KiwiSDR board for "debian"?

  • edited September 2022

    @wayne I tried to change "debian" password from KiwiSDR admin console and it was succeeded:

    If you have removed debian from the sudo group, you can add it again with "usermod -aG sudo debian"

  • edited September 2022

    Awesome idea, that worked, I'm in with debian and a new passwd for that account! Thank You!

  • edited September 2022

    Changing the sshd_config to add PermitRootLogin yes also worked. Now I can login as root or debian. Thanks again!

  • edited September 2022

    You are welcome.

Sign In or Register to comment.