I need to send commands to Huawei olt Software (MA5801). With ssh2 on my script python, I am connecting but the terminal says this:
Huawei Integrated Access Software (MA5801).Copyright(C) Huawei Technologies Co., Ltd. 2002-2019. All rights reserved.
MA5801-Lab-02-xx.xxx.xxx.xxx> Warning: Using the initial password is not recommended. Please change thenpassword.
MA5801-Lab-02-xx.xxx.xxx.xxx>Unknown command, the error locates at
MA5801-Lab-02-xx.xxx.xxx.xxx>Configuration console exit, please retry to log on
and this my code
import paramiko
transport = paramiko.Transport(('xx.xx.xxx.xxx', 22))
transport.connect(username='user', password='password')
ssh = paramiko.SSHClient()
ssh._transport = transport
stdin, stdout, stderr = ssh.exec_command('enable;config;interface gpon 0/1')
result = stdout.read(), stderr.read()
for line in result:
print(line)
ssh.close()