Search

Linux Crash Course – Public Key Authentication

Public Key Authentication with OpenSSH is preferred, as it’s a much stronger method of authenticating to your servers when compared to using password authentication. In fact, password authentication in OpenSSH should always be disabled. But before you can password authentication, you’ll need to set up public key authentication, and that’s exactly what we’ll do in today’s video.

YouTube player

Commands used in the Video

Check to see if a key is present already (list the storage)

ls -l ~/.ssh

Generate a key

ssh-keygen -b 4096

Follow the prompts to create the key.

Test SSH connectivity

ssh user@<ip_or_host_name>

Copy your key to a remote server

ssh-copy-id user@<ip_or_host_name>

New Linux Products!


Support LearnLinuxTV and receive 5% off an LPI exam voucher!