Hi,
I want to create a universal port profile which will run a python script in order connect to a remote ssh host and check some health information.
I've tried the following
import pexpectimport exshexpect
exosPrompt = '::--:--::'
p = exshexpect.exshspawn(exosPrompt, exsh.clicmd)
p.sendline('ssh vr "VR-OAM"
[email protected]')
idx = p.expect([passPrompt, pexpect.EOF, pexpect.TIMEOUT])
p.sendline('mysecretpassword')
p.sendline('exit')
But i always get the prompt to enter it manually ignoring the two last commands.
Regards
Sotiris