Retrieving netstat from local server python script
===

How do i retrieve the netstat -a data from my python script from a local server. I have tried `subprocess.Popen(['ssh','server','pass','netstat','-a'],stdout=file1)` but it does not work. Any advice?