Last active
April 9, 2018 08:56
-
-
Save ooneko/4e508333b70c9dc2eec578faee3fad85 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess | |
| subprocess.call(["ssh", "user@host"]); | |
| # or execution a command | |
| import subprocess | |
| ret = subprocess.call(["ssh", "user@host", "program"]); | |
| # or, with stderr: | |
| prog = subprocess.Popen(["ssh", "user@host", "program"], stderr=subprocess.PIPE) | |
| errdata = prog.communicate()[1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment