Untitled
unknown
plain_text
a year ago
445 B
10
Indexable
import subprocess
# Define the command
command = ['sshpass', '-p', 'wow', 'ssh', 'jjjjjjjjjj@1.1.1.1.1', f'"ping {param} 1 -c4 {host}"']
# Run the command using subprocess.run()
try:
result = subprocess.run(command, capture_output=True, text=True)
print(result.stdout) # Print the output of the command
print(result.stderr) # Print any error messages
except subprocess.CalledProcessError as e:
print(f"Error: {e}")Editor is loading...
Leave a Comment