[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Does Fabric work on Windows?
Re: Does Fabric work on Windows?
Thu, 10 Sep 2020 06:10:14 +0200
I used to work more than 5y ago on some tool (rougly 30k lines of code
IIRC) Fabric/paramiko based for Linux and Windows environment and for
Windows we used Cygwin ssh. It did one weird thing on Windows. Only the
first command was executed with root/admin rights and the consecutive
commands were executed under normal user rights. So we wrote some
wrapper/decorator to reconnect after each run which made it little bit
slow but it was working. I don't remember technical reasons for this
issue. I think it had something to do with ssh channels. Other than that
it was working fine. Anyway nowadays it probably would not be a first
> I know some folks have used Fabric (or more specifically Paramiko; Fabric
> itself simply wraps Paramiko) to target Windows SSH servers (of which
> are at least a few), but it's definitely a minority use case and not one I
> have personal experience with - which is why I can't give a simple yes/no
> SSH itself is entirely shell agnostic, so it really comes down to two
> aspects of the server software in question:
> - How well does it speak the SSH protocol, as implemented by OpenSSH
> is the gold standard and what Fabric/Paramiko are typically tested
> against). If it does weird things it's more likely to not work well. We
> unfortunately don't/can't prioritize a platform that has few users and is
> difficult for us to personally test on.
> - What is it actually doing with your commands - is it spawning a bash
> process (Cygwin, WSL bash, etc), running Powershell, or even running the
> Windows DOS prompt? This will determine what you want to be sending to it.
> I assume the SSHD in question will document what it does here.
> Finally, there are some minor features in Fabric which assume a Unix shell
> on the remote end, but these are typically conveniences you can readily
> work around.
> Hope that helps some,
> On Wed, Sep 9, 2020 at 5:32 PM <firstname.lastname@example.org> wrote:
>> I would also be interested if this is the case (or direction).
>> A few years ago when I was looking for a library providing an OS
>> shell wrapper in Python, I ended up using Fabric for Linux/Unix and
>> my own wrapper for PowerShell on Windows. Now that the open-source
>> of PowerShell (pwsh) has been out for a while and working on UX
>> variants, I
>> recently had a go at using it. But the required OS libraries for
>> models (NTLM/Kerberos/etc) on the different Linux variants… too
>> for an generic wrapper.
>> My use-case needed to talk to all servers in any customer’s datacenter,
>> without provisioning agents or changing any configurations. I needed to
>> what was already there, which meant PowerShell (and not SSH) on Windows.
>> FWIW, my purpose was to automate discovery of software application
>> dependencies as input into application/service modeling and monitoring
>> downstream. If it’s helpful, you can see the PowerShell wrapper I
>> in the Open Content Platform project
>> What I found was that OpenSSH was pretty close to being uniform across
>> Windows and UX variants; heck, it’s even available now in the Features
>> in recent Server or workstation builds. But pwsh, which requires
>> at least currently… not close enough for my liking.
>> *From:* Fab-user <email@example.com>
>> Behalf Of *Paulo Roberto de Souza Carvalho
>> *Sent:* Wednesday, September 9, 2020 2:57 PM
>> *To:* firstname.lastname@example.org
>> *Subject:* Does Fabric work on Windows?
>> I ask because on all the pages I entered I only found
>> examples of Unix / Linux commands.
> Jeff Forcier
> Unix sysadmin; Python engineer