fail: sshd
Brian Inglis
Brian.Inglis@SystematicSW.ab.ca
Fri Jan 24 23:02:39 GMT 2025
On 2025-01-24 12:30, Soren via Cygwin wrote:
> Hello folks. A few weeks ago, on Dec 19, I wrote to you all on the cygwin
> list "[...] I am able to ssh into those [Debian] boxes from my Cygwin box
> without any trouble. But when I try to ssh *into* my Cygwin box, the
> connection attempt times out." Etc. So now, I wanted to inform the
> community that I am successfully logging-in via ssh to my Cygwin laptop.
> The point of failure, as suggested to me in replies, was Windows Firewall.
>
> When the laptop arrived and Windows 10 set itself up, it gave no
> information about turning on the firewall (typical Microsoft) and so I had
> never given it any thought. When I went to try seeing the settings based on
> the advice received, I reluctantly stumbled at first because Windows 10
> doesn't have the familiar "Start" button anymore. Instead, it has a
> "Search" field which may or may not find internal settings on first
> attempts -- instead it may search the Web. Also typical Microsoft. Now that
> I know, the steps are:
>
> Settings -> Privacy & security -> Windows Security
>
> I turned the firewall off completely; my only connectivity is at home over
> a secure WiFi net. I don't haul this laptop around connecting to strange
> WiFi networks.
I believe in belts and braces/suspenders wherever possible to reduce SPoF!
You could adapt the following to allow ssh on port 22 or whatever you need.
Extract from elevated admin script to allow curl build tests with perl:
set add=netsh advfirewall firewall add rule
set prof=Private
set dir=In
set proto=Any
set act=Allow
:: ... Profile Action Direction Protocol
set params=Profile=%prof% Action=%act% Dir=%dir% Protocol=%proto%
FOR /f "usebackq" %%c IN (`cygpath -aw /bin/`) DO IF EXIST %%c set bindir=%%c
:: ... Name Profile Action Direction Protocol Program
%add% Name=perl %params% Program=%bindir%\perl.exe
which also looks up a bunch of test programs in build directories and sets them
all up for running against the current test release.
> I hope this helps someone else.
>
> Soren Andersen
>
> Thanks to
> Kevin Schnitzius
> Brian Inglis
> Andrey Repin (your English seems just fine)
>
> On Fri, Jan 3, 2025 at 8:38 PM Andrey Repin via Cygwin wrote:
>>> Check Windows SSHD is not running and disabled!
>> Or moved to a different port. ( C:\ProgramData\ssh\sshd_config )
>> In some specific situations, you WILL need native SSH available, Cygwin one
>> will not work for VS Code remote server f.e.
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut
-- Antoine de Saint-Exupéry
More information about the Cygwin
mailing list