Jun-16-2017, 08:52 PM
(This post was last modified: Jun-16-2017, 09:06 PM by sparkz_alot.)
Hello I am new to python. trying to use a list to ssh to my remote server
thanks,
#!/usr/bin/python import subprocess node = ['node41', 'node42', 'node52'] link = ['eth0', 'eth0', 'eht0'] for i in range(len(node)): print node[i], s16d1[i] subprocess.call(["ssh", node[i], 'ip link show s16d1[i]'])getting his error
Error:Device "link[i]" does not exist.
How can I pass device link from the list ssh remote command?thanks,