python - Using Plink to run multiple remote commands in interactive shell session -


sudo python code connect remote server not getting output. able connect remote using pexpect on windows not work.

from subprocess import popen,pipe command = "plink.exe -ssh test@test.com -pw root123" sh = popen(command, stdin=pipe, stdout=pipe) sh.stdin.write('ls /\n') sh.stdin.write('ls /usr\n') sh.stdin.close() out = sh.stdout.read() 


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -