Windows 10: Cannot access a server on Windows 10 using ssh key

Discus and support Cannot access a server on Windows 10 using ssh key in Windows 10 Network and Sharing to solve the problem; 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... Discussion in 'Windows 10 Network and Sharing' started by ValentinNitnelav, Mar 20, 2020.

  1. 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 message that I get on Windows:

    C:\Users\Valentin\.ssh>ssh XXXXXX -vvvOpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5debug1: Reading configuration data C:\\Users\\Valentin/.ssh/configdebug1: C:\\Users\\Valentin/.ssh/config line 1: Applying options forXXXXXX [Host]debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2debug2: resolve_canonicalize: hostname 111111 is addressdebug1: Executing proxy command: exec ssh -A -W 111111xxx.xxx@**** -i C:\\Users\\Valentin\\.ssh\\id_rsadebug3: spawning "C:\\WINDOWS\\System32\\OpenSSH\\ssh -A -W 111111xxx.xxx@**** -i C:\\Users\\Valentin\\.ssh\\id_rsa"CreateProcessW failed error:2posix_spawn: No such file or directory

    It says Failed to open file:C:/ProgramData/ssh/ssh_config error:2 but I do not have this file at all. Is this mandatory to have on Linux everything is running fine without it. In addition to that I already have the config file on my Windows?

    This is what my config file looks like:

    C:\Users\Valentin\.ssh>type configHost XXXXXXHostName 111111User xxxProxyCommand ssh -A -W %h:%p xxx.xxx@**** -i C:\Users\Valentin\.ssh\id_rsaAddKeysToAgent yesIdentityFile C:\Users\Valentin\.ssh\id_rsa

    Obviously, I've got different Host, Hostname, etc. The ones here serve as examples. Please, note that I managed to run git clone on Windows using the ssh keys to verify that they work. So the problem is not in the keys - it's in the path, I predict.

    NB: PuTTY is the last thing I want to use. First, I want to make sure there is a simpler way of doing this without installing any of additional software.

    I would really appreciate if someone could help me out with this.

    :)
     
    ValentinNitnelav, Mar 20, 2020
    #1

  2. ssh Server for Windows 10?

    Hi ,

    are there any news regarding ssh Server for Windows 10 ?
     
    Nicolae Petridean, Mar 20, 2020
    #2
  3. bro67 Win User
    Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

    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, Mar 20, 2020
    #3
  4. jimbo45 Win User

    Cannot access a server on Windows 10 using ssh key

    W10 includes BOTH SERVER and Client SSH

    Hi folks
    these days you can SSH INTO windows from another machine without needing any 3rd party software -- the client is available by default but the server is also present -- you install it in the Add features in settings and then you have to enable it.

    However that's not quite the end of the story as you have to enable it so go into powershell (admin mode) , start the sshd service and set it to start automatically on boot.

    Now for example from a Linux machine I can ssh into a windows one -- if you want to mess around woth ports etc alter firewall rules to suit.

    Anyway simple screenshots showing the base principle of how to use it.

    1) Windows side : set up ssh server: (note change config file if you want to permit "root" or admin ssh access.


    Cannot access a server on Windows 10 using ssh key [​IMG]


    2) Linux side logon to Windows SSH -- testing using a Linux Virtual Machine.

    first on the Linux box as normal user enter ssh L: [email protected] Enter password at prompt then you will get into the windows box in command mode as shown here


    Cannot access a server on Windows 10 using ssh key [​IMG]


    If you want a full Windows GUI though you will have to have some type of "X" server on the Linux box (a Window manager) and enable 'X' (yes it's 'X' - not a typo !!) over ssh but that's another story -- usually for quick access the command lie is good enough for admin things and to retrieve the odd file (or receive one).

    I use it on the Linux box in a bash script to receive a Macrium image backup I run on the Windows box nightly. That way I've always got a Windows backup file on the NAS server as well as on Windows itself.

    Cheers
    jimbo
     
    jimbo45, Mar 20, 2020
    #4
Thema:

Cannot access a server on Windows 10 using ssh key

Loading...
  1. Cannot access a server on Windows 10 using ssh key - Similar Threads - Cannot access server

  2. Can't install open ssh server in windows 10

    in Windows 10 BSOD Crashes and Debugging
    Can't install open ssh server in windows 10: I am unable to install open ssh server in windows 10. I have used the GUI method add optional featuresbut it did not work then I checked it is already installed or not using PowerShellC:\WINDOWS\system32> Get-WindowsCapability -Online ? name -like "openssh*"And the result was...
  3. Can't install open ssh server in windows 10

    in Windows 10 Gaming
    Can't install open ssh server in windows 10: I am unable to install open ssh server in windows 10. I have used the GUI method add optional featuresbut it did not work then I checked it is already installed or not using PowerShellC:\WINDOWS\system32> Get-WindowsCapability -Online ? name -like "openssh*"And the result was...
  4. Can't install open ssh server in windows 10

    in Windows 10 Software and Apps
    Can't install open ssh server in windows 10: I am unable to install open ssh server in windows 10. I have used the GUI method add optional featuresbut it did not work then I checked it is already installed or not using PowerShellC:\WINDOWS\system32> Get-WindowsCapability -Online ? name -like "openssh*"And the result was...
  5. Installation/Enabling of SSH-Server not working

    in Windows 10 Network and Sharing
    Installation/Enabling of SSH-Server not working: For a project I need SSH (both the client as well as the server) on my local machine. So I did an "add optional feature", picked the SSH client as well as the SSH server and installed both. The installation went smooth, i.e. the progress bar for both reached 100% and I got an...
  6. Cannot connect to Ubuntu server from Windows 10 via ssh

    in Windows 10 Network and Sharing
    Cannot connect to Ubuntu server from Windows 10 via ssh: Hello, I have a raspberry pie running ubuntu server 2020 and would like to connect to it via ssh directly from Windows 10. In order, for instance, to mount an ftp and view, edit directly files with vscode or atom without going through WSL. While I have no problem...
  7. SSH: tasks closed with the SSH session (Minecraft Server)

    in Windows 10 Ask Insider
    SSH: tasks closed with the SSH session (Minecraft Server): So i have tried running it normally wich runs it in the opened terminal. I also tried using start server.bat wich supposedly opens a separate CMD but it still closes with my session. submitted by /u/ZNOW_05 [link] [comments]...
  8. 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...
  9. Using SSH Using Windows Terminal

    in Windows 10 Ask Insider
    Using SSH Using Windows Terminal: Hey Everyone, I made a quick video showing how easy it is to setup a button on Windows Terminal to save SSH sessions. I hope you find it helpful! https://www.youtube.com/watch?v=2xfBpN9fHuM&feature=youtu.be submitted by /u/DevOps-Journey [link] [comments]...
  10. Can Windows 10 Generate SSH Key-Pairs for SSH Access to Itself?

    in Windows 10 Network and Sharing
    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...