Remote Host Accessibility

How to check port on remote host is accessible

Synopsis

This post shows how to validate remote host is accessible.

Motivation

There are many solutions out there on how to check that port on a remote host is accessible. But we needed a solution that would not hang up.

Checking …

more ...

SSH Pipe with Python's Subprocess and Multiprocessing

How to pass objects to remote system using SSH and Multiprocessing

Synopsis

Previous post on this subject used os.fork and os.pipe to issue SSH in a child process. Instead, this post uses multiprocessing Process and Pipe to make it more platform agnostic. Per audience request, this post will …

more ...

SSH Pipe with Python's Subprocess

How to pass objects to remote system using SSH

Synopsis

This post shows how to create pipe channel over SSH. In particular, it demonstrates how to instantiate pipeline channel over SSH. We use this channel to pass an object to a remote system. This post shows two methods. One using …

more ...

SSH Made Easy Using Python Subprocess

Subprocess Module

Synopsis

Python's subprocess module makes it easy to invoke external commands on localhost. It can also use SSH to invoke commands on remote hosts.

How simple?

The short answer is, very simple!

The longer answer is, subprocess.run, as follows:

1
2
3
4
5
result = subprocess.run …
more ...