Buster setup ssh: Difference between revisions

From embeddedTS Manuals
(Created page with "Openssh is installed in our default Debian image, but by default openssh does not permit root logins, and requires a password to be set. To allow remote root login: <source l...")
 
(Add some help so that a host key is generated if needed.)
 
Line 1: Line 1:
Openssh is installed in our default Debian image, but by default openssh does not permit root logins, and requires a password to be set.  To allow remote root login:
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:
<source lang=bash>
<source lang=bash>
sed --in-place 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sed --in-place 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
systemctl restart ssh.service
systemctl restart ssh.service
/bin/ls /etc/ssh/ssh_host*key >/dev/null 2>&1  || ssh-keygen -A
passwd root # Set any password
passwd root # Set any password
</source>
</source>


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

Latest revision as of 18:32, 8 July 2021

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.