Ubuntu provides public key authentication login to account

After you create a user account below does not generate .ssh found hidden folder, install the online article, try the command: ssh-keygen is not successful, then manually create.
In the user's home directory, e.g. / home / User /
the sudo mkdir .ssh
the sudo chown user.user .ssh /
the sudo Touch the authorized_keys

Then open the Edit
sudo vim authorized_keys

Ubuntu provides public key authentication login to account

Save and exit, users can log in using key verification

Guess you like

Origin blog.51cto.com/helpdesk/2422329