I'm writing a python script (on a Linux box) that will perform an SSH and run a string of commands on the remote machine (Sun-OS). I'm having trouble getting the remote commands to run and give expected output and I'm not sure if this is even possible.
Depending on the syntax I use, sometimes I get : "ksh: 28317 Segmentation Fault(coredump)"
If this is not possible, but it is using a different method in either python or at the CLI, please let me know.
Thanks!
ssh user@remote_machine "/dvs/dncs/bin/tellDhct -h mempoll/mempoll_lowmem_ips.out | awk '{print $1}' > mempoll/mempoll.macs && /dvs/dncs/bin/tellDhct -h mempoll/mempoll_nonresp_ips.out | awk '{print $1}' >> mempoll/mempoll.macs"