I want to send a command between two laptops using ssh and using Paramiko to do it. Commands such as ls
and echo
are working as expected, but when using non-standard commands like iPerf I get the following error:
['bash: iperf: command not found\n']
The command works fine if I open an ssh connection through my manual terminal.
Here is the code:
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(hostname=HOST, username=USER, password=PWD)
stdin, stdout,stderr = ssh.exec_command("iperf -s")