How do I ssh into my embedded Linux machine as root?
Sep 29, 2020
asked by anonymous
Question / Issue:
When I try to ssh as root, I get the following:
$ ssh root@192.168.1.199
Permission denied, please try again
I'm sure I know the password.
Responses:
Date: Sept. 29, 2020
Author: Mind Chasers
Comment:
Since ssh is answering, you know it's running. In our example below, we're using an NXP LS1046A-FRWY board running the Ubuntu userspace:
Via your terminal / UART, do the following:
# ps -e | grep sshd
6093 ? 00:00:00 sshd
# kill -9 6093
In the same terminal, edit /etc/ssh/sshd_config and remove the '#' in front of
PermitRootLogin yes
Save your changes and restart the sshd daemon:
/etc/init.d/ssh start
Starting ssh (via systemctl): ssh.service.
Now give it another try from your remote machine.
$ ssh root@<host ip address>
root@<host ip address>'s password:
Welcome to Ubuntu 18.04.2 LTS (GNU/Linux 4.14.83 aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage