Rahix / tbot

Automation/Testing tool for Embedded Linux Development
https://tbot.tools
GNU General Public License v3.0
84 stars 21 forks source link

Display SSH connection errors #90

Open Rahix opened 1 year ago

Rahix commented 1 year ago

Right now, when an SSH connection fails, no useful error message is shown. If a user wants to find out why the connection failed, they have to retry in channel-debug mode (newbot -v) to see the error printed by the ssh command.

Ideally, tbot should detect the connection failure and log the error message before raising an exception. This is a bit tricky because the error shows up right in a spot where we also expect data that we don't want to log to console (shell initialization).

A possible solution may be to detect a closed channel during ssh initialization and only log output then. This may have timing problems, though.