Does anyone know why a ssh command output to the screen and to a variable is not the same? my meaning is when the command output direct to the screen it's and when i save it to a variable and then print the variable is not the same output:
to the screen:
s.sendline ('uptime')
s.prompt()
print s.before
s.logout(
output:
uptime
09:52:40 up 170 days, 16:20, 4 users, load average: 0.02, 0.02, 0.00
to a variable:
running = s.sendline ('uptime')
print (running)
output:
7
i'm really don't understand where the '7' comes from and why i got to different outputs?
Thanks for the help.
paramikomodule? github.com/paramiko/paramiko