ssh doesn't work when using powershell, cmd, wls, or hyper terminal - 3rd party ssh clients: Putty, Termius work

Marc 21 Reputation points
2021-12-10T13:08:28.253+00:00

HI at All,

I am posting this, sine I am running out of ideas. Maybe I am missing something, but can't find a reason of the behavior bellow:

Previously I was using Ubuntu deployed in wls 2.0 (earlier on Win10 and now Win11) also for SSH-ing any remote servers, or internal VMs (vbox machines), among other things. All worked well for months on Win10 also on Win11 and I was happy, because linux console and built-in features work for me better

After some time, ssh to a remote server stopped working within a wls linux. Basically:

  • ping works,
  • ncat works - I can open port 22, or custom ssh port e.g. 55712
  • But SSH always timeouts.
  • As first I've tried 3rd-party Hyper Terminal. It was working as first which is weird because I ran into the same behavior after few days
  • I found out the same behavior in cmd, and power-shell
  • As first I was suspecting a Win firewall as root cuase, but the issue was always present also when firewall disabled
  • The issue became more interesting when I found out that it works well when using putty, for the same servers, ports etc.
  • SSH works also from guest Win10 (VM in vbox on the same laptop), it works well using cmd, power shell etc. It simply doesn't work only within host OS Win 11.
  • I am unable to SSH neither any internal guest VMs, before I was always able to ssh any VM on virtualbox, but atm I can see the same behavior, ping works, ncat can communicate with the port, but SSH timeouts
  • I've tried already LAN cable connection to rule out wifi-card's driver
  • Firewall reset to defaults (although it is the same when turned off)

I don't know what else it could be. How is it possible that any server is reachable (so routing, connection all is ok) using a putty client, but ssh doesn't work using cmd, powershell, or wls linux? Interesting is also that Hyper terminal worked few days, after the issue occurred in wls, but not any more.

I'm getting paranoid, does anyone have any idea before I will have to reinstall the OS? I take this as the very last option, since it is one month old clean installation on formatted SSD, and I am always keeping my OS as clean as possible, avoiding any SW which is not necessary, or rarely used. I am testing stuff within a VM. I can't find any official KB for the same behavior. If I will need to reinstall newly installed OS for such stupid problem, I won't install Win11 back.

UPDATE:

  • I've tried also another 3rd party SSH clients, e.g. Termius and it works, so it fails with CLI tools, cmd, powershell, wls, hyper terminal etc.
  • I don't use any 3rd party Antivirus or firewall, only using default Defender and Firewall.
  • but I've installed one of the top 3rd party antivirus yesterday as a double-check (trial ver.), but system is clean, few processes are running on the top - all I know, they are widely used, app shows good reputation
  • Win up to date, incl drivers and firmware
  • I've reviewed all installed apps by installed date and can't see anything newer to the time when it started, only regular updates
  • I've uninstalled few more tools - no change
  • Reset of network with reboot done - no change

Can access the same server using putty:
156679-cd9bb95c-6248-4b78-8d0d-6a06abfcb441.png
156680-39b8e003-3933-41c1-b1cb-ec4b1e36058b.png
156668-5c79c1e9-3630-46d3-9b88-fb1ba81b8899.png

Thank you all in advance for your ideas.

Windows for business | Windows Server | User experience | PowerShell
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,901 Reputation points
    2021-12-10T20:01:30.897+00:00

    OpenSsh isn't part of PowerShell.

    Did you install SSH using the Microsoft Apps & Features? Or the OpenSSH-portable from GitHub (OpenSSH-Portable)? The support for those products are independent of each other.


1 additional answer

Sort by: Most helpful
  1. brijesh v 1 Reputation point
    2022-08-03T17:54:28.707+00:00

    hi Marc-7910
    i also had same issue with ssh command not working correctly but was able to connect to remote using putty, i checked with mulitple solution and many of them didnt work, finally i came across a thread that talks about saving login info in C:\<>.ssh\config file , i found that contents of this files were not correct , so you have to configure the names like below to easily ssh to the server

    Host <some_string>
    HostName <Valid IP address>
    User <username>

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.