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.

# LearnLinuxTV Sites
? Main site:
вћЎпёЏ https://www.learnlinux.tv

? LearnLinuxTV Community:
вћЎпёЏ https://community.learnlinux.tv

? LearnLinuxTV Wiki:
вћЎпёЏ https://community.learnlinux.tv

# Support LearnLinuxTV (commission earned)
? Check out my latest book, Mastering Ubuntu Server 3rd Edition. Covers Ubuntu 20.04!
вћЎпёЏ http://ubuntuserverbook.com

? Support me on Patreon and get early access to new content!
вћЎпёЏ https://learnlinux.link/patron

☁️ Support LearnLinuxTV and get your own cloud server with Linode:
вћЎпёЏ https://learnlinux.link/linode

? Affiliate store for Linux compatible hardware/accessories:
вћЎпёЏ https://learnlinux.link/amazon

? Check out the Tiny Pilot KVM for your Homelab:
вћЎпёЏ https://learnlinux.link/tinypilot

? Check out Shells.com to spin up your very own Linux or Windows desktop in the cloud:
вћЎпёЏ https://learnlinux.link/shells

# Timecodes:
00:00 – Intro
02:32 – Checking if the OpenSSH client is present (Linux)
03:10 – Checking if the OpenSSH client is installed (MacOS)
03:44 – Installing PuTTY (Windows 10)
05:12 – Generating an SSH keypair (Linux and macOS)
08:40 – Testing OpenSSH connectivity (Linux and macOS)
09:30 – Copy the public key over to a remote server (Linux and macOS)
12:09 – Setting up a session for a server in PuTTY for Windows
13:38 – Creating an SSH key pair in Windows with PuTTYgen
15:40 – Using a PEM key to connect to a Linux server via PuTTY in Windows 10

# Video-specific links
? Download PuTTY:
вћЎпёЏ https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

# About Me
? Follow me on Twitter!
вћЎпёЏ https://learnlinux.link/twitter

? More about me:
вћЎпёЏ https://www.jaylacroix.com
вћЎпёЏ https://www.learnlinux.tv

# Recommended evergreen videos:
? How to create a bootable flash drive for installing Linux
вћЎпёЏ https://linux.video/flash-usb

? Understanding Linux permissions
вћЎпёЏ https://linux.video/perms

? OpenSSH Guide
вћЎпёЏ https://linux.video/ssh

? LVM Deep-dive:
вћЎпёЏ https://linux.video/lvm

? How to better secure OpenSSH:
вћЎпёЏ https://linux.video/secure-ssh

☁️ How to create a cloud Linux server with Linode:
вћЎпёЏ https://learnlinux.link/create-linode

# FAQ
? Which distro do I use?
вћЎпёЏ https://learnlinux.link/mydistro

? My recording gear (commissions earned):
вћЎпёЏ https://learnlinux.link/recording-stuff

#SSH #OpenSSH #Linux

By admin

19 thoughts on “Linux Essentials – Public Key Authentication”
  1. I am very inspired by how much you give back to the linux community. so today I started my own linux blog in my language. not sure how long I will last but I made the first step.

  2. Hey Jay! Quick side note. Windows 10 does come with OpenSSH by default now. I forget which update brought it in, but Microsoft ported OpenSSH to Windows. The client is there by default, and you can install the server portion really easily. Just fire up a cmd or Powershell prompt, and ssh wherever you'd like to go. The ssh agent doesn't seem to be working yet, they have that disabled by default. And Windows won't use Pagent, so using keys properly can be quite the nuisance. But, then again, working in Windows in general is just a nuisance. 😀

    This opens up the ability to manage your Windows servers using Ansible and SSH, rather than Ansible and…shudder…WinRM.

  3. Hi jay, I’ve implemented keys to connect to my servers in my lab, but I also make changes to the ssh config file to disable the pw prompt if someone tries to log in. Is that still necessary following this method?

  4. I have a question about setting up PKA. If you do this, and disable password authentication, then what happens if your laptop blows up or gets stolen? Wouldn't you be locked out of your server forever? If you can only access your server through PKA, and you lose your computer that has the private key on it, then what happens?

  5. @7:04 — Setting a passphrase

    What would you need to do, if you did set a passphrase, but sometime later, you want to change your passphrase?
    Would you need to generate a new key pair, and upload the your new public key, to every server that has your old passphrase?

Leave a Reply

Your email address will not be published.