SFTP - Use WinSCP to Login to SFTP without Password using Public Key Private Key Pair

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how someone demo here how to use winscp to generate a public key private key and what to do with that public key such that you can login via a SFTP server without a password so I am going to go on to the client and I've downloaded winscp and I'm going to have the URL for the download in the description area so what I'm going to do here after downloading and installing winscp I'm going to go to under tools I'm going to run puttygen and I am going to say generate and when I generate I have to move my mouse so I have to move my mouse in order to to generate a random key here so after I generate the random key I'm going to save the public key and private key onto my onto my system and what I do is I'm going to give the public key to the administrator of the SSH server or the SFTP server and they will have to put that in a specific location for you to log in without a password so I'm going to go through all of that after I generate this key but I just wanted to do this step by step and it's almost done here you'll notice it generates a key so I did use the default ssh to RSA and the bit length of 2048 so i'm going to save my private key and you have an option of using a pass phrase for your key so if you use a passphrase for your key you're going to be prompted to type in the passphrase much like a password when you log in so I am going to skip that or actually I am going to put in a passphrase I'm just going to say password because I have another key that had with that doesn't have a passphrase so I'm going to demo that also so I'm going to save the private key and I'm just going to name it key too and I'm also going to save the public key here and I am going to name it key to pub so incidentally I've already saved the the first key on to the server so you'll notice here up top it says cut and paste this into your open SSH authorized key file so normally what you would do is you would send the administrator this this public key so pretend I sent this my key 0 2.2 the administrator of the SFTP server and he receives it and he's gonna paste it on to his desktop here and he's going to open this up and edit it and he's going to get a file that looks like this and what he has to do is go into the user folder that's going to use that public key and has to create a folder that SSH and he's going to have to do that via the command line or if you're in UNIX you could set it up in UNIX the same way most UNIX uses OpenSSH so this is the same procedure so under authorized keys I already have a key in here so I'm going to be putting another key and the key expects let me open this up in text pad because it shows the lines all in one line so the key expects the prefix of SSH and the key in one line so the key format that is received looks like this but I have to copy the entire body here and paste it into the file and get rid of the lines putting it all in one line and you'll notice I have to get rid of one more line that's really it so so if I save this file now I can log in via two keys so if after the administrator does that let me demo going back to where the user is I am going to go into winscp now the first key I have here does not require a password so let me demo that here when I'm logging in you'll notice it doesn't require a password it doesn't prompt me for anything and also when I created the key I didn't specify a passphrase so it also did not prompt me for that now for me to set up the second key I'm going to open up with SCP again and I am gonna have a new login here and I am going to call this one logging in as the same user but different key I'm going to leave the password blank because I'm not logging in the password click advanced click authentication here point it to the cheat my private key so my private key that I'm using is 0-2 and I'm going to click OK here and I'm actually going to save this and I'm going to save it as key too so we could distinguish between the two keys keep in mind my key to had a passphrase and I'm going to log in and you'll notice it's going to prompt me for a password as you can see and I'm going to type in my password also click remember but I'm just going to type it in so now I'm logging in without the normal credentials of username and password so there you go that's how you log in without the username and password but via a public key private key exchange and thank you for watching
Info
Channel: CodeCowboyOrg
Views: 199,175
Rating: undefined out of 5
Keywords: WinSCP, SFTP, OpenSSH, SSL, SSH, Public Key, Private Key, Key Pair, Public Key Private Key Pair, Public Key Private Key, Key Exchange, without Password, Login, Login without Password, SFTP Login, No Password, how to, how, tutorial, demo, review, FileZilla, Import, KeyGen, ssh-keygen, Generate Keys, Keys, Private, Public, RSA, DES, Encryption
Id: g5T1Ahy2RkM
Channel Id: undefined
Length: 6min 5sec (365 seconds)
Published: Wed Apr 27 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.