Skip to main content
added the usage of it only for a specific purpose
Source Link
user130167
user130167

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the /root/.ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

I would add this is only used by me for one purpose. Backing up the Pi to my backup drive over the network it needs root access for those files owned by it, as the Pi USB implementation is so poor, it is faster to do it that way. All you save by not doing it the correct more secure way of logging in as normal user then going to root with su is one step.

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the /root/.ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the /root/.ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

I would add this is only used by me for one purpose. Backing up the Pi to my backup drive over the network it needs root access for those files owned by it, as the Pi USB implementation is so poor, it is faster to do it that way. All you save by not doing it the correct more secure way of logging in as normal user then going to root with su is one step.

put path to the keys file so no doubt of the locatiion.
Source Link
user130167
user130167

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the /root/.ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the .ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the /root/.ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.

Source Link
user130167
user130167

You make it work as root by leaving the configuration alone.

MacUser2525:~$ cat .ssh/id_rsa.pub 
ssh-rsa AAAAB3N
MacUser2525:~$ ssh [email protected]
Linux buster-raspi 5.9.0-0.bpo.5-arm64 #1 SMP Debian 5.9.15-1~bpo10+1 (2020-12-31) aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Feb 23 22:22:43 2021 from fe80::1003:5492:80fa:2bc5%eth0
root@buster-raspi:~# cat  .ssh/authorized_keys 
ssh-rsa AAAAB3NzaC1

With this setting you enabled you have allowed root to login with a password.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Root
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".

These are not needed to be changed as well.

root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Pubkey
#PubkeyAuthentication yes
root@buster-raspi:~# cat /etc/ssh/sshd_config | grep Authorized
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody

In short I have nothing set that you do only the defaults that load, the contents of my id_rsa.pub in the .ssh/authorized_keys file allows me to login as root. At least the guide you follow has not told you to change the port. This will only work if the root user is enabled on your Pi I see nothing saying you did this.

sudo passwd root

That sets your root password and enables the root user.