Background: I am using python and paramiko to automate the process I go through everytime I have to hand in a program for a class. We use a command called
To workaround this and get the output of Ifconfig, you may wanna try to use the option get_pty=True
e.g:
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
def MonitorProcess():
ssh.connect('10.2.0.230', username='ibmsys1', password='passw0rd', timeout=5)
stdin, stdout, stderr = ssh.exec_command('/sbin/ifconfig', timeout=3, get_pty=True)
#stdin, stdout, stderr = ssh.exec_command('/sbin/ifconfig') -> simple exec ex.
print stdout.read()
MonitorProcess()