Тёмный

Configure and Install OpenSSH Public key authentication in Windows 10 for remote connectivity 

VirtualizationHowto
Подписаться 54 тыс.
Просмотров 37 тыс.
50% 1

OpenSSH server can be installed in Windows 10 and allows connecting using the SSH protocol to Windows 10 clients and Windows Server 2019 hosts. Using SSH allows you to standardize on the connection protocol you are using for remote connectivity to remote Linux and Windows hosts. It also provides great interoperability between Linux and Windows.
If you have a development pipeline running on a Linux box and it needs to connect to a Windows client or Windows Server, SSH connectivity is much less problematic than WinRM and even remote PowerShell connections. In this video walkthrough we will take a look at how to configure OpenSSH Publickey authentication in Windows 10 and look at how to do this step-by-step.
This can also provide a great alternative way to communicate with remote Windows clients and Windows Servers from configuration management platforms like Ansible.
Subscribe to the channel: / @virtualizationhowto
My blog: www.virtualizationhowto.com
_____________________________________________________
Social Media: / vspinmaster
LinkedIn: / brandon-lee-vht
Github: github.com/brandonleegit
Take a look at the blog post covering OpenSSH Server Windows 10 install with Public key authentication here:
www.virtualizationhowto.com/2...

Хобби

Опубликовано:

 

8 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 69   
@whats_skills
@whats_skills Год назад
Great video, very well explained. One thing I would add -- if your network is setup as a public network, you have to change it to private and allow network discovery. You can use ping to verify you're able to reach your device from another computer on your network. And finally, use the windows event logger to see any errors if you're still facing connectivity issues.
@middle_pickup
@middle_pickup 8 месяцев назад
Thanks for the info. I spent hours last night trying to get my windows 10 machine to accept key authenticated connections. Your config file changes were the fix.
@dimedroll
@dimedroll Год назад
Thank you, I spent two days to set up ssh login without entering a password, only your video helped me figure it out!
@ameador01
@ameador01 2 года назад
I was trying to figure out how to access Linux instances via OpenSSH client on Windows with key authentication - this gave me the answer to that as well - the -i parameter with the private key location! Thanks!
@struggle375
@struggle375 Год назад
Thank you! I spent like 8 hours trying to figure out why I kept getting permission denied after following every ssh tutorial on RU-vid. Just incase anyone else has the same issue as me, @ 8:15 notice the "Owner: testuser" is a local user. On my initial setup of ssh and creation of these files I was logged into Windows using a Microsoft account, NOT a local user. The owner of the "authorized_keys" must be the local "testuser"
@paultruzzi911
@paultruzzi911 Год назад
It would really help if you had different backgrounds or something so that it would be easier to know when you are on the remote server and local workstation.
@capitainethug5550
@capitainethug5550 2 года назад
I love your video, simple and precise! thank you very much!
@arthursambi2511
@arthursambi2511 Год назад
after re-watching and following your video many times (over 6 times) I finally got it too work. It was the switching back and forth between admin and your test user that flubbed me up. At one point you didnt mention switching back to the administrator and that is where I would mess up. Anyhow good video all in all.
@VirtualizationHowto
@VirtualizationHowto Год назад
Arthur, thank you for your comment! So glad you got it figured out. Thanks again!
@borys4206
@borys4206 Год назад
Thank you, this is one of the better videos I've managed to find online!
@VirtualizationHowto
@VirtualizationHowto Год назад
Borys, so glad you liked it and it was helpful!
@varunmurugan2349
@varunmurugan2349 2 года назад
thank you very much...after days of searching finally got the solution !
@stephene.chiang5805
@stephene.chiang5805 29 дней назад
This was super helpful, thanks!
@FhargaZ
@FhargaZ Год назад
I checked many videos but this was the better explained one, thanks. If i try to create the folder ".ssh" with the account that is going to be setup for the connection i got "You must type a file name" and it seems it doesn't like the dot before the string. What i did was to create the folder as ".ssh." and then it removed the ending dot 😄I tested the keys from another server with Filezilla, i had to use the private key and it worked. And also i will check how to create a specific folder so they don't enter to the home user folder.
@TheVincent0268
@TheVincent0268 4 месяца назад
Works perfectly!
@danielhq1253
@danielhq1253 Год назад
2023 windows 11 cliente hacia windows 10 ssh server > y estos pasos si funcionan , muchas gracias
@jerkshop
@jerkshop 8 месяцев назад
dude you are one awesome guy! damn I am so happy learning!
@kangourou702
@kangourou702 6 месяцев назад
Thanks a lot!
@leogryffindor7930
@leogryffindor7930 6 месяцев назад
you are amazing man, i almost had no idea how ssh works. great tutorial
@VirtualizationHowto
@VirtualizationHowto 6 месяцев назад
Thank yuo u@leogryffindor7930!
@VirtualizationHowto
@VirtualizationHowto 6 месяцев назад
Also, be sure to sign up for the VHT forums where you can get personalized help on other issues, lab questions, etc: www.virtualizationhowto.com/community
@fuatcoskun4510
@fuatcoskun4510 8 месяцев назад
Great, thank you.
@Kman3107
@Kman3107 Год назад
Oh my lord ! ! ! I tried getting public keys to work, but it never would. I have been stressing about for well over an hour (I'm afraid it might even be more), and the simple issue was that part! Thank you for saving my sanity! Or maybe it's already too late..
@SoundToxin
@SoundToxin 9 месяцев назад
The first few minutes alone were a big help. I had tried to follow a written guide on the winscp site but it did not mention editing sshd_config in ProgramData. Making sure pubkey auth was explicitly enabled and disabling password auth as well as commenting out those couple lines at the end of the file did the trick. I had already done most of the setup the other day and put my public key in the authorized_keys file but for some reason it just kept prompting me for a password when I connected, and this particular machine had no password and empty passwords aren't allowed by default so I couldn't get in at all. I was worried it was something with the permissions of the .ssh dir being wrong. My goal here was to get an ssh server running on this Windows machine in my house so I could use sftp instead of running back and forth with a flash drive. Most of my stuff runs GNU/Linux so I'm used to having ssh everywhere, but the setup on Windows was a bit unintuitive. Glad I've got this working now.
@matteopalese9261
@matteopalese9261 5 месяцев назад
really great video you saved my time and I learned a lot
@VirtualizationHowto
@VirtualizationHowto 5 месяцев назад
@mattheopalese9261 thank you for the comment! Glad the video helped!
@e.v.f595
@e.v.f595 Год назад
Love you ma man thanks a lot
@_Mohanned
@_Mohanned 3 месяца назад
Life saver!
@mohamedeladl6273
@mohamedeladl6273 Год назад
thanks
@TheElvilla05
@TheElvilla05 Год назад
Thanks!!!
@brockobama257
@brockobama257 Месяц назад
Phenomenal! Thank you except one think. Disabling ssh by password got me to the Permission denied (publickey,keyboard-interactive). error which was bad. I want to be able to ssh in from anywhere with pw, and without pw from my trusted machines.
@mtagab007
@mtagab007 2 месяца назад
helpful !
@exus696
@exus696 Год назад
Very well explained. I am struggling to find maxlogins in limits.conf file equivalent in windows version of openssh. Is it possible ? Please help
@vincentjay7429
@vincentjay7429 Год назад
Just because it's commented out does not mean it is not working. There is a default state in config spelled out. If commented text ends with YES it is enabled by default and you only need to remove the hash when you want it OFF. :)
@oscarmarreroengstrom6115
@oscarmarreroengstrom6115 Год назад
I've been trying for a couple of hours but I seem to be stuck. Any help would be appreciated. I am getting a 'Permission denied (publickey,keyboard-interactive)' error when I try to ssh into the host (my desktop) from my laptop. I am confused about some parts of the video. It seems like the OpenSSH SSH Server and OpenSSH Authentification Agent services are being started from the Administrator user in the video. However, this seems to be the user from which a connection is made to the testuser at the end. Shouldn't these services have been started on the testuser and not the Administrator then? Another thing that I am confused about is where the ssh-keygen command should be run. Is it on the client or the host? The same goes for the authorized_key files, should it be on the client or on the host?
@0xjunimo609
@0xjunimo609 7 месяцев назад
The ssh-keygen command is run on the server to generate the public key for the client to use in its authorized_keys file
@0xrofii69
@0xrofii69 Год назад
thanksss
@gems824
@gems824 9 месяцев назад
Will it work for SFTP as well?
@Thewickedjon
@Thewickedjon 9 месяцев назад
im not sure what i'm doing wrong, I think I followed the instructions step by step but i must have missed something - to get past the (create the .ssh folder) i just powered my way through it with cmd > mkdir - where am I suppossed to generate the keys?? I did all of this on the server im trying to connect to., should I create the keys from the computer I want to use to connect to the server? - if the answer to that last question is (yes) , i tried it but it did not generate a public key, Is there anyone who can help me? Thank you!
@uguremirmustafaoglu40
@uguremirmustafaoglu40 Год назад
Sound quality of the video prevents this valuable content to be appeared on top of the search.
@VirtualizationHowto
@VirtualizationHowto Год назад
Ugur thank you for your comment. Definitely trying to improve on video quality, audio in particular :)
@ethanweatherhead4087
@ethanweatherhead4087 2 года назад
what about using a yubikey generated in openpgp, i want to ssh with the yubikey on command prompt to multiple servers how do i do that?
@VirtualizationHowto
@VirtualizationHowto 2 года назад
Ethan, check out this link for configuration info using Yubikey: developers.yubico.com/PGP/SSH_authentication/index.html
@ethanweatherhead4087
@ethanweatherhead4087 2 года назад
@@VirtualizationHowto I've seen this documentation as well as dr duh's writeup, but i'm still quite confused, i think it has something to do with the ssh-agent, i want the local host to obtain the private key from my yubikey where the remote machine can identify through that in order to create a passwordless connection, could you do a tutorial on that please (specifically on command prompt windows) thank you....
@user-oh2fr4me2b
@user-oh2fr4me2b 5 месяцев назад
I have linux Redhat 8 client machine try to sftp to Windows 2022 with OpenSSH. Using password works fine but when i tried ssh key didn't work. i use, in sshd_config file Match User to their E:\sftp home folder not under C:\Users\UserProfile. Where to tell ssh to read authorized_keys file? is it under %Programdata%\ssh\sshd_config or under C:\Users\UserProfile\.ssh\authorized_keys? Thanks!
@VirtualizationHowto
@VirtualizationHowto 5 месяцев назад
@user-oh2fr4me2b thank you for the comment! Sign up here on the VHT forums and create a new topic and let's discuss this in more detail: www.virtualizationhowto.com/community
@be-kind00
@be-kind00 7 месяцев назад
@VirtualizationHowto I'm confused at step of creating RSA key pairs . I have a windows 10 Pro PC and a synology NAS with SynoCLI Monitor tools that includes iperf. I want to be able to SSH into the Synology to use the iperf3 software. I also want to use the the perf client on Windows 10 and also create an SSH server to run that. So, the keypair thing is unclear to me about where you genereate them and where you put them (both pub and private). Also when I go into ADMIN Power Shell there is no user directory named ADMINISTRATOR so I went into my user folder and where I created the authorized.keys file. Later when I created id_rsa and known hosts file it put it in the same directory. So, I think I was supposed to generate the keys on the synology NAS and then put them in the authorized.keys file on the windows PC? It looks like you are creating an SSH Server in the begining of the video and then putting a client on the 2nd PC??? Also at the end why didn't you have to put a port number in when you logged in?
@VirtualizationHowto
@VirtualizationHowto 6 месяцев назад
@be-kind-for-u2 thank you for the comment. If you don't mind, create a topic on the VHT forums here and I can give you more personalized help: www.virtualizationhowto.com/community.
@be-kind00
@be-kind00 6 месяцев назад
@@VirtualizationHowto I did that
@VirtualizationHowto
@VirtualizationHowto 6 месяцев назад
@@be-kind00 awesome, let me know your forum username and I can create a new topic and mention you there.
@user-yc9cr1tm9m
@user-yc9cr1tm9m Год назад
In my case, the error "Permission denied" appeared. O ssh did not accept the private key because the file "id_rsa" did not have the proper permissions, and the warning appears (use the -v parameter) "WARNING: UNPROTECTED PRIVATE KEY FILE!". Change permissions and leave only for your user, administrators and the system. Good luck!
@thenewone3944
@thenewone3944 Год назад
what about a key generated on a linux server to windows? I've done all of the steps shown and it is still prompting for a password
@technerd3455
@technerd3455 Месяц назад
same here
@everdomeio7855
@everdomeio7855 4 месяца назад
no matter what i did, always ask me for password for somereason, i dont even have password on my windows, could u tell me how to fix that
@patchbyte6856
@patchbyte6856 8 месяцев назад
I hate windows so much
@adrian_franczak
@adrian_franczak Год назад
still cant connect from macos to windows - Permission denied :/
@BadAtEverything555
@BadAtEverything555 Год назад
Same, did you end up figuring it out?
@adrian_franczak
@adrian_franczak Год назад
@@BadAtEverything555 to private Windows laptop there is no problem - to my work laptop I can’t but rdp works fine - if I add -vvv there is something about successful connection and then dropping by server with code X
@user-yc9cr1tm9m
@user-yc9cr1tm9m Год назад
In my case, ssh did not accept the private key because the file did not have the proper permissions as shown in the video, and the warning appears (use the -v parameter) "WARNING: UNPROTECTED PRIVATE KEY FILE!". Leave permission only for your user, administrators and the system. Good luck!
@gamercabbar9233
@gamercabbar9233 9 месяцев назад
Cant save the ssh config file but i am administrator
@AjayYoutube-rz2so
@AjayYoutube-rz2so 3 месяца назад
Same issue did u got any solutions?
@eltechnica
@eltechnica 4 месяца назад
bro, you need to zoom in so we can see what youre doing, no one needs to see your face either.
@Konstantin_Liberty
@Konstantin_Liberty Год назад
*Thank you so much. I sat up half the night, did not understand what it was, and it turns out it was necessary to comment out the last two lines.* # Match Group administrators # AuthorizedKeysFile __PROGRAMDATA__/ssh/administrators_authorized_keys
@VirtualizationHowto
@VirtualizationHowto Год назад
Ah yes imLEGR, I have ran into this as well. I may have missed this in the video? I will need to rewatch to see. Thanks for the comment!
@Konstantin_Liberty
@Konstantin_Liberty Год назад
@@VirtualizationHowto Just thanks to your video I made ssh, thank you. If it were not for you - I would have been looking for a long time why my connection does not work. Your video helped me :)
@Leandro-df9hp
@Leandro-df9hp Год назад
thanks a lot, very helpfull
@adityasprojects7126
@adityasprojects7126 Месяц назад
i love you.......... 😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😘😘😘😘😘😘😘😘😘😘😘😘
@jstbe
@jstbe 2 года назад
Thank you so much for the detailed guide!
Далее
SSH Keys
10:12
Просмотров 103 тыс.
OpenSSH for Absolute Beginners
23:00
Просмотров 100 тыс.
Lasagna Soup @Lionfield
00:35
Просмотров 10 млн
когда мучает жажда // Eva mash
00:58
Просмотров 389 тыс.
100❤️
00:19
Просмотров 3,4 млн
OpenSSH is about to change. (For the better.)
10:00
Просмотров 139 тыс.
SSH To Windows Using Public Key
13:40
Просмотров 71 тыс.
DON'T Install WINDOWS Without Watching This FIRST!
11:11
SSH Key Authentication | How to Create SSH Key Pairs
18:46
Эй Рамазан # DamirAgroDizel
0:17
Просмотров 4,1 млн