Using python3.7 and netmiko 3.4.0. I'm trying to connect to a Linux Ubuntu 18 server. I see that Netmiko can ssh login, but afterwards it fails with the error shown below. This is using 'device_type=linux'. If I use 'device_type=generic' I don't see the error, however this device type is not supported by the file_transfer, which requires 'linux'.
In summary, when the connection is established using device type 'linux' , netmiko throws the following error:
user_id@my-host-name ~ >
DEBUG:netmiko:Clear buffer detects data in the channel
DEBUG:netmiko:read_channel:
DEBUG:netmiko:[find_prompt()]: prompt is user_id@my-host-name ~ >
DEBUG:netmiko:read_channel:
DEBUG:netmiko:write_channel: b'\n'
user_id@my-host-name ~ >
DEBUG:netmiko:read_channel:
DEBUG:netmiko:[find_prompt()]: prompt is user_id@my-host-name ~ >
DEBUG:netmiko:write_channel: b'\n'
DEBUG:netmiko:Pattern is:
user_id@my-host-name ~ >
user_id@my-host-name ~ >
DEBUG:netmiko:write_channel: b'exit\n'
DEBUG:paramiko.transport:EOF in transport thread
ERROR:root:Error when attempting to connect with SSH: Router prompt not found: 'user_id@my-host-name ~ >'
Why does Netmiko it fail , since it had established the SSH connection successfully? Is there a work around to avoid this failure?