Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pssh for Windows OS #144

Open
phillip-from-oz opened this issue Dec 11, 2024 · 5 comments
Open

pssh for Windows OS #144

phillip-from-oz opened this issue Dec 11, 2024 · 5 comments

Comments

@phillip-from-oz
Copy link

Is it possible to run pssh under Windows OS?

I have python3 installed installed on my Windows 10:
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Questions

  1. Could I install this as:
    In powershell, python3 -m pip pssh
  2. What pre-requisites are required?
    I'm using putty as my ssh program
  3. What changes would be required?

Thanks for any help

@lilydjwg
Copy link
Owner

You'll need openssh. Putty is not supported (it's a GUI thing anyway). Run ssh -V to check and make sure you can use the ssh command to login into your servers.

To install this project, you need to clone this repository (or download as a zip file) and run pip install . in the directory.

@phillip-from-oz
Copy link
Author

  1. I installed open SSH and tested that I can ssh to my servers
  2. installed pssh using the instructions provided
  3. Run
    python3 pssh
    ModuleNotFoundError: No module named 'fcntl'

Apparently there is not fcntl module for Windows

@lilydjwg
Copy link
Owner

Retry latest master. Those fcntl calls are removed.

@phillip-from-oz
Copy link
Author

Thanks for your quick response.

module 'os' has no attribute 'pipe2'

trace:
python3 pssh -A -i -H "TRAK-TRAIN01" echo "abc"
Traceback (most recent call last):
File "C:\p\pssh-python\bin\pssh", line 119, in
do_pssh(hosts, cmdline, opts)
File "C:\p\pssh-python\bin\pssh", line 75, in do_pssh
manager = Manager(opts)
File "C:\p\pssh-python\psshlib\manager.py", line 38, in init
self.iomap = make_iomap()
File "C:\p\pssh-python\psshlib\manager.py", line 301, in make_iomap
return IOMap()
File "C:\p\pssh-python\psshlib\manager.py", line 188, in init
wakeup_readfd, wakeup_writefd = os.pipe2(os.O_NONBLOCK)
AttributeError: module 'os' has no attribute 'pipe2'. Did you mean: 'pipe'?

@lilydjwg
Copy link
Owner

lilydjwg commented Dec 13, 2024

OK, there are some SIGCHLD-related code, and I don't know how to do the same thing on Windows. So no, Windows is not supported. Maybe you can try wsl2 which is a Linux virtual machine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants