Python for Entrepreneurs Transcripts
Chapter: Source Control and Git
Lecture: SSH Key Management in Windows

Login or purchase this course to watch this video and the rest of the course contents.
0:01 If you're using Windows, you can download an application that will generate SSH keys for you, there's nothing built into the operating system
0:08 that will allow you to create a key pair like ssh-keygen on Linux or Mac but we can use a separate program to do this for us.
0:16 So that's what we're going to do in this video, if you are using Linux or Mac feel free to skip this one.
0:21 At your Windows desktop, click on your browser of choice, and bring out, that's
0:30 Click the link to download PuTTY but we don't want the putty.exe file, what we want is PuTTYgen, so go ahead and download that file,
0:43 save it, and we can run it. A newer versions of Windows may tell you that you can't run the file because you don't have appropriate permissions,
0:53 but in our case we do want "more info" and we want to say "run anyway". This is the PuTTY Key Generator, you can think of it like a user interface
1:00 that's very similar to ssh-keygen on Linux or Mac. Make sure that "SSH-2 RSA" is selected and then click generate.
1:08 And we want to randomly move our mouse around and that will allow us to have some randomness that will be input into the key.
1:15 Just go ahead keep moving your mouse around until the green bar is all the way over to the right side.
1:25 After we've moved our mouse around enough to generate randomness, we'll get the key generated, now what you'll see here is the public key
1:35 for pasting into an authorized key file or for uploading to GitHub, so we can copy and paste that and put that wherever we want.
1:43 This is public key, so anyone can have this, this file can be shared publicly.
1:47 Now just like with the ssh-keygen command, we can add a pass phrase if we choose.
1:53 For a development key, I typically say that you should use a pass phrase, now if you're automating a deployment, you may not want a pass phrase,
1:59 but in our case, for a development key, we do want to add a key phrase, add a secure pass phrase, it has to be the same on both,
2:09 and then you can select save public key and we can save this wherever, under downloads you might want to call it just
2:20 and we can save our private key and we call this just entrepreneurs. We can bring this up in our downloads folder, this is the public key,
2:32 we can share this widely, we'll copy and paste this into GitHub and then we have our private key.
2:37 So that's how we generate public and private keys on Windows using the PuTTYgen application.

Talk Python's Mastodon Michael Kennedy's Mastodon