How can I run tmsh (f5) command and get output using SSH python ?
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('1.1.1.1', username='username', password='password')
ssh.exec_command('ls') //Working
# how to execute tmsh command using ssh ?
ssh.exec_command('tmsh show /sys CPU') // ???
While working on this I got the solution to solve this problem:
Using this command, I can get the tmsh output. Without grep it will return blank output in stdout.read().