Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
On a Sinsgle Machine¶
SSH¶
The pipeline command is run locally. If you want the pipeline command to run remotely, place the whole command to be run remotely in double/single quotes. For example, the command below SSH into into a Hadoop client through a proxy configured by proxychains, prints the content of a text file and then count the number of lines in the file.
:::bash proxychains ssh client_ip /apache/hadoop/bin/hdfs dfs -cat adset_id/adset_id_642.txt | wc -lThe
wc -lcommand is run locally instead of running on the Hadoop client. Since proxychains prints out some information too, thewc -lwill over count the number of lines in the text file. The correct way is count the number of lines on the Hadoop client instead of counting locally. A simple way is to place the whole command to be run on the Hadoop client in double/singls quotes. Below is an illustration.:::bash proxychains ssh client_ip '/apache/hadoop/bin/hdfs dfs -cat adset_id/adset_id_642.txt | wc -l'
https://
paramiko/paramiko¶
paramiko/paramiko is a pure Python implementation of SSHv2. It is a great tool to interact with a remote server in Python.
asyncssh¶
ssh2-python¶
ssh2-python
is a super fast Python SSH library based on libssh2 C library.
sshtunnel¶
On a Cluster of Machines¶
Ansible¶
parallel-ssh¶
Asynchronous parallel SSH client library. Run SSH commands over many (hundreds/hundreds of thousands) number of servers asynchronously and with minimal system load on the client host.
ClusterSSH¶
fabric¶
Ansible is a better alternative than fabric.
References¶
http://
https://medium.com/RyanHiebert/sftp-via-socks-proxy-using-paramiko-a736afe17b9e
https://
https://
https://
https://medium.com/keagileageek/paramiko-how-to-ssh-and-file-transfers-with-python-75766179de73
https://
https://
https://