Hello geeks,
Am trying to write a custom plugin using python but it seems python is not handling the SSH part well, find below for the code:
#!/usr/bin/python
import os, sys
host = sys.argv[1]
pdpactgsm=os.popen("ssh -l GbeAdi $host "pdc_kpi.pl" | grep -A 4 sgsn_g | awk 'NR == 5 ' | awk '{print $4}' | sed 's/[^0-9,.]*//g'").readline().strip()
Python keeps pointing to the double quotes.
I have tried single quote but the command is not been passed to SSH correctly.
I know there are some Python SSH libraries but they seem not to have what I need or too deep to handle and time is not on my side.