HuaweiSwitch / CloudEngine-Ansible

Ansible modules to automate HUAWEI CloudEngine switches
GNU General Public License v3.0
144 stars 51 forks source link

"msg": "Error: Could not open connection, possibly due to unacceptable SSH subsystem name." #54

Closed wayneshow closed 6 years ago

wayneshow commented 6 years ago

use ce_command module is success, but use other module is failed! `ansible -m ce_command -a "commands='display vlan summary' transport='cli' host=10.x.x.x port=22 username=admintest password=Huawei@123" localhost --connection local

localhost | SUCCESS => { "changed": false, "stdout": [ "Number of static VLAN: 4\nVLAN ID: 1 101 201 to 202 \n\nNumber of dynamic VLAN: 0\nVLAN ID: \n\nNumber of service VLAN: 42\nVLAN ID: 4000 to 4010 4064 to 4094" ], "stdout_lines": [ [ "Number of static VLAN: 4", "VLAN ID: 1 101 201 to 202 ", "", "Number of dynamic VLAN: 0", "VLAN ID: ", "", "Number of service VLAN: 42", "VLAN ID: 4000 to 4010 4064 to 4094" ] ] }`

`ansible -m ce_vlan -a "vlan_id='203' transport='cli' host=10.x.x.x port=22 username=admintest password=Huawei@123" localhost --connection local

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: SSHError: Could not open connection, possibly due to unacceptable SSH subsystem name. localhost | FAILED! => { "changed": false, "msg": "Error: Could not open connection, possibly due to unacceptable SSH subsystem name." }`

vb2000 commented 6 years ago

I had the same issue, you most likely need to enable the netconf server on the Huawei switch:

system-view snetconf server enable commit

wayneshow commented 6 years ago

I had the same issue, you most likely need to enable the netconf server on the Huawei switch:

system-view snetconf server enable commit

I have enabled the netconf server, but it not work!!!

vb2000 commented 6 years ago

Are you getting the same error as before? Which version of ncclient are you running?

wayneshow commented 6 years ago

@vb2000 is the same error. ncclient-0.6.2-

wayneshow commented 6 years ago

@vb2000 thank you , I have solved, service-type should permit snetconf.