Windows 10: Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

Discus and support Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself? in Windows 10 Network and Sharing to solve the problem; All, I'm quite adept at key generation and public/private key authentication on Linux, but am basically a fish out of water on windows. I have Win10... Discussion in 'Windows 10 Network and Sharing' started by drankinatty, Oct 23, 2016.

  1. Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?


    All,

    I'm quite adept at key generation and public/private key authentication on Linux, but am basically a fish out of water on windows. I have Win10 with Ubuntu bash installed and I've had no problem with the ssh-keygen from within bash and setting up outbound passwordless ssh access to all Linux hosts. That is not what this questions asks.

    This is about generating keys natively within Win10 so that I can ssh into Win10 w/o a password. (not the WSL bash instance, Win10 itself) For example, I can sit on my arch host and ssh into Win10 as follows:

    Archlinux Host 'valhalla' to Windows 10 host 'elite' (HP elite workstation):

    Code: 20:04 valhalla:~> uname -a Linux valhalla 4.8.3-1-ARCH #1 SMP PREEMPT Thu Oct 20 19:53:59 CEST 2016 x86_64 GNU/Linux 20:04 valhalla:~> ssh elite david@elite's password: Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Users\david>dir /a Volume in drive C is Windows Volume Serial Number is EA64-6B82 Directory of C:\Users\david 10/23/2016 03:38 PM <DIR> . 10/23/2016 03:38 PM <DIR> .. 10/22/2016 05:40 AM <DIR> AppData 10/22/2016 05:40 AM <JUNCTION> Application Data [C:\Users\david\AppData\Roaming] 10/22/2016 07:35 AM <DIR> Contacts 10/22/2016 05:40 AM <JUNCTION> Cookies [C:\Users\david\AppData\Local\Microsoft\Windows\INetCookies] 10/22/2016 07:35 AM <DIR> Desktop 10/23/2016 04:17 PM <DIR> Documents 10/23/2016 02:53 AM <DIR> Downloads 10/22/2016 11:40 PM <DIR> Favorites 10/22/2016 07:35 AM <DIR> Links 10/22/2016 05:40 AM <JUNCTION> Local Settings [C:\Users\david\AppData\Local] 10/22/2016 07:35 AM <DIR> Music 10/22/2016 05:40 AM <JUNCTION> My Documents [C:\Users\david\Documents] 10/22/2016 05:40 AM <JUNCTION> NetHood [C:\Users\david\AppData\Roaming\Microsoft\Windows\Network Shortcuts] 10/23/2016 03:37 PM 1,572,864 NTUSER.DAT 10/22/2016 05:40 AM 163,840 ntuser.dat.LOG1 10/22/2016 05:40 AM 131,072 ntuser.dat.LOG2 10/23/2016 03:38 PM 1,048,576 NTUSER.DAT{de890eec-984b-11e6-b234-9452f8984253}.TxR.0.regtrans-ms <snip> C:\Users\david>exit Connection to elite closed. 20:04 valhalla:~>[/quote] The question is "is there a way to generate ssh keys (ecdsa) on Win10 natively?" (e.g. id_ecdsa and id_ecdsa.pub) and "if so, where do you put them on windows"? (is there a user .ssh directory, where they go? Is there a native authorized_keys files - or equivalent? How do I tell windows to use which key-pair?)

    Worst case, "can I generate a key-pair on Linux and move the pair to Win10 and tell windows to use it?" (if so, same questions "How? ...and, where would they go?")

    (as a side note, it was just impressive as heck to be able to ssh into a windows OS, something I've taken for granted on Linux for 16 years, but was somewhat surprised when it worked into Win10, and good job with the base bash install, e.g. inclusion of vim, ssh-keygen, etc. and the base gcc install.)

    :)
     
    drankinatty, Oct 23, 2016
    #1

  2. ssh and Windows 10 Not Working

    There are two desktop computers in my home:

    One running Debian Linux and one running Windows 10.

    They both access the Web through a wireless router (Verizon).

    The issue is that I cannot access the Windows box via ssh (OpenSSH or PuTTY).

    I am able to access the Linux box from the Windows box - via ssh (via both OpenSSH and PuTTY).



    For the sake of simplicity and in order to eliminate Linux from the equation, I tried:

    ssh localhost

    ssh 192.168.1.2

    ssh HOME



    ssh matt@localhost

    ssh matt@192.168.1.2

    ssh matt@ HOME

    (where localhost, 192.168.1.2, and HOME are all the Windows box).

    None of those 3 worked - either in PuTTY or in OpenSSH.

    I either get:

    Connection to localhost closed by remote host.

    Connection to localhost closed.



    Or I get:

    ssh: connect to host 192.168.1.2 port 22: Connection timed out

    -

    I wanted to make sure that I could access this PC from another in one way or another
    - so I went ahead and created a homegroup which this computer and another household Windows 10 (laptop) are part of. That other Windows 10 PC
    is able to access this PC (and, for what it's worth, this PC can access the laptop).

    Note that a firewall runs on the Windows box. But I get the same results whether it's up or down.

    Anyone know what's going on?

    TIA, Matt
     
    ManThisIsReallyBizarre, Oct 23, 2016
    #2
  3. Chang2011 Win User
    Does Windows Phone 7 support VPN or SSH Tunnel??

    Does Windows Phone 7 support VPN or SSH Tunnel + SOCKS Proxy Forwarding??

    Android VPN sucks!! But Android market can download SSH tunnel software.

    Apple VPN is great. But Apple doesn't support SSH tunnel.

    Living in evil China we need either VPN or SSH to "climb the wall" to access the Facebook or Twitter.

    Don't get me wrong. I am not Chinese.
     
    Chang2011, Oct 23, 2016
    #3
  4. bro67 Win User

    Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

    Keys can get out of sync if the Linux system generates a new set with each session. That has to be fixed on the Linux side, has nothing to do with Windows.

    One of the systems has to generate the keys, both cannot do so at the same time.
     
    bro67, Oct 23, 2016
    #4
  5. I'm a bit confused. I have no problem generating a pair of keys, and Linux will not regenerate anything unless issue the ssk-keygen command again. If I can use any key-pair, where do I put the public key within windows 10 so it will accept my logins without prompting for a password?
     
    drankinatty, Oct 23, 2016
    #5
  6. bro67 Win User
    If the Linux machine is running OpenSSH, it will generate the key for you to log into it from Putty or FTP. If you log into the Windows Machine with FTP, you would need a SSH keygen running on the Windows machine. Both machines cannot generate a separate SSH key for the same session. When the keys get out of sync on the remote system, for what is stored on the computer you are logging into it with. You have to physically go in to the remote machine at its actual keyboard and monitor to reset the Key, so that the Keygen can create the same one.

    It works just like when you use a codeword between two people to validate that they are friend or foe. If say the keyword was "Chocolate Ice Cream". But you state "I went to the store to pick up some Vanilla Ice Cream." The reply would be "Not correct". SSH is a way to make sure that the computer trusts those who are logging in via a remote access.
     
    bro67, Oct 23, 2016
    #6
  7. I apologize, I must not be making myself clear. I tried hard not to ask an XY question. All I need to know is "Where do the keys go on the windows machine?" Meaning what folder do they get squirreled away in so I can take a new key-pair and put them in the right place on the windows box. I know the Linux end of the game inside and out, but I'm clueless on the windows end of it.

    All I want to do it take a new key-pair, installed it in whatever folder they are supposed to go in on Windows 10 so that anytime I'm away from my laptop on another machine, I can issue the command `ssh mylaptop` and have it connect without the password prompt. Just like I do on the 20 other Linux boxes I talk to. Also, if in addition to putting the key-pair in whatever the proper place is on windows, there are registry tweaks needed to tell windows "Hey, use this key-pair for david.", I need that information as well. I've searched the Microsoft site to no avail. It is like ssh'ing into your OS is an undocumented concept. All I need is a link to the technical docs, if they exist, and I can take it from there.

    I'm sorry if I was unclear, but it seems like such a simple question. I've answered it 10 times over on stackoverflow and superuser for Linux users, but it seems I'm doomed to failure to find the same information as it applied to windows. I really do appreciate your help, but it just seems like we are not communicating. Is there some other way I can explain what I'm looking for that would help?
     
    drankinatty, Oct 24, 2016
    #7
  8. bro67 Win User

    Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

    The keys are kept under your user profile on that machine you log in with. They transfer with your profile if it is a Roaming Profile that is either on a Domain or using a Microsoft Live account that is your email and a password to login with.

    The keys have always been kept under the user profile.
     
    bro67, Apr 5, 2018
    #8
Thema:

Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

Loading...
  1. Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself? - Similar Threads - Generate SSH Key

  2. Windows 10 SSH

    in Windows 10 Gaming
    Windows 10 SSH: Hi! So I was trying to a Headless Raspberry Pi, kind of unrelated and in the Windows Search I put SSH. without thinking I clicked it, and now there's a WIFI network with my computer's name. how do I turn it off? Thanks! P.S: the WIFI network doesn't appear on the computer,...
  3. Windows 10 SSH

    in Windows 10 Software and Apps
    Windows 10 SSH: Hi! So I was trying to a Headless Raspberry Pi, kind of unrelated and in the Windows Search I put SSH. without thinking I clicked it, and now there's a WIFI network with my computer's name. how do I turn it off? Thanks! P.S: the WIFI network doesn't appear on the computer,...
  4. Windows 10 SSH

    in Windows 10 Network and Sharing
    Windows 10 SSH: Hi! So I was trying to a Headless Raspberry Pi, kind of unrelated and in the Windows Search I put SSH. without thinking I clicked it, and now there's a WIFI network with my computer's name. how do I turn it off? Thanks! P.S: the WIFI network doesn't appear on the computer,...
  5. About ssh

    in Windows 10 Network and Sharing
    About ssh: I am using ssh accounts to protect my privacy when i am browsing.Sometimes ssh account disconnects for few seconds and the automatically reconnect again.But even after ssh account disconnected my connection is still alive but not through ssh tunnel.----------1 We know some...
  6. ssh key

    in Windows 10 Ask Insider
    ssh key: I have a windows pc and i want to ssh into it from my phone with a key so I generated a key in my pc. I used “scp \id_rsa.pub user@ip” command but every time i try to connect to my pc using my private key it ask for a password. Anyone can help me? submitted by /u/ZER0-00...
  7. SSH timeout?

    in Windows 10 Ask Insider
    SSH timeout?: [ATTACH] I'm using the console emulator "cmder" What is the built in ssd system for windows 10? https://preview.redd.it/b7awvk4578051.png?width=1151&format=png&auto=webp&s=638a243c765a8981a61e74cf975ef86f94697ca4 submitted by /u/SalvosMachina [link] [comments]...
  8. SSH aliases?

    in Windows 10 Ask Insider
    SSH aliases?: Is there any way to make a config file for host aliases? example: I want to be able to type "ssh linuxmachine" instead of ssh user@ipaddress I tried making a config.txt file in my .ssh user folder that reads: Hosts "linuxmachine" hostname "ipaddress" user "username"...
  9. Cannot access a server on Windows 10 using ssh key

    in Windows 10 Network and Sharing
    Cannot access a server on Windows 10 using ssh key: I successfully connected to the server on Linux but I could not connect to the same server with the same ssh keys that I copied to my Windows 10 computer. I have already did a lot of research on forums regarding this problem but could not find the answer. Here is the debug...
  10. SSH

    in AntiVirus, Firewalls and System Security
    SSH: Hello everyone.. Am looking some help with my Open SSH Private and Public Key..Windows 10 Professorial. I Enable the ssh run's the Common ssh-keygen and it ask for a password and I did put an Password but now that I need the Public Key to use as the Password and I have no...

Users found this page by searching for:

  1. do key pairs have to be generate on the machine that will be connected to