Skip to content

Instantly share code, notes, and snippets.

@josephcoombe
josephcoombe / ssh_from_windows_with_subprocess_openssh_example.py
Last active December 19, 2023 15:52
SSH from Windows 10 using subprocess + OpenSSH
# SSH from Windows 10 using Python subprocess + built-in OpenSSH
#
# Alternatives to using subprocess include:
# Fabric: http://www.fabfile.org/
# Paramiko: http://www.paramiko.org/
#
# References:
# OpenSSH in Windows 10: https://blogs.msdn.microsoft.com/commandline/2018/01/22/openssh-in-windows-10/
# The only simple way to do SSH in Python today is to use subprocess + OpenSSH...: https://gist.github.com/bortzmeyer/1284249
# Issue8557 - subprocess PATH semantics and portability: https://bugs.python.org/issue8557