Buster setup ssh

From embeddedTS Manuals
Revision as of 18:32, 8 July 2021 by Lionel (talk | contribs) (Add some help so that a host key is generated if needed.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Openssh is installed in our default Debian image, but by default openssh does not permit root logins, and requires a password to be set. Additionally, a host key is required if one hasn't already been created on the target board. To allow remote root login:

sed --in-place 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart ssh.service
/bin/ls /etc/ssh/ssh_host*key >/dev/null 2>&1  || ssh-keygen -A
passwd root # Set any password

If you ssh to this system it will now support ssh as root.