The normal installation/configuration of SSH on a client requires the use of ssh-keygen to create a local private/public key pair in the .ssh folder of the user's profile.
To configure the normal, secure login process, the client user's public key must be 'copied' to the
.ssh/authorized_keys file to in the server user's home folder.
These operations must be performed while the server's sshd configuration is set to allow
PasswordAuthentication (yes) and to have the
AuthorizedKeysFile value set to the current location of the user's
That location may not be in the user's actual
/home folder if the server is running Centos 7, which encrypts the user folders, preventing access during ssh login. The
AuthorizedKeysFile value would likely be
/etc/ssh/%u/authorized_keys in that case.
However, to create a login for the server root account on a client, especially from... say a Mac, creating a
root user presents problems.
Therefore, how does one create a user on a client linux/bsd system who will be recognized by ssh on the server, be mapped to the correct alternate (%u) folder for verifying the login's public key when the sshd is properly configured to prevent
AllowRootLogin, and require
Mostly, how do I create a public key for the
root user on the client that can be
ssh-copy-id or cat-copied to the necessary hacked-in location on the server's