SSH library and Windows destination, using "write", "No match found"

The goal is to create SSH connection between 2 hosts, the Robot tests is executed on Windows 10. Robot Framework 5.1b2, SSH library 3.8.0
The same test is executing on Linux and Windows targets, they are both needed to open an SSH session on another Linux machine.

SSHLibrary.**Set client configuration**     prompt=)?
${Output}=      SSHLibrary.**Write**       ssh root@
${Output}=      SSHLibrary.**Read Until Prompt**

Before executing, the test verifies that “known_hosts” file is deleted so the next response to the ssh will be signature verification. Succeed on Linux while Windows display error:
Write ${ConnectCommand}
18:56:05: No match found for ’ ’ in 10 seconds Output: [10X]0;Administrator: C:\Windows\system32\conhost.exessh root@

Its my second issue with SSH and Windows
Thanks !

You could try to not use the Read Until Prompt, because it seems to be the failure cause.
Or, experiment changing the prompt to ‘:’ because that is the end of the output.
Other thing to consider is the timeout. Is 10 seconds enough time?

Thanks Helio. The problem is that it crashes in “write”, it supposed to ignore the input during write (its working properly on Linux)

Well, I a have a similar setup (I don’t set the prompt):
Open Connection ${host_under_test} port=22 width=160 height=80 alias=jumphost
Login With Public Key (...)
Write ssh -o StrictHostKeyChecking=no (...)

(Note: Why such old RobotFrameworki version?)

Thanks Helio. I’ll try it. We are moving to 6.1 soon, its a large project with many tests and we need to verify before upgrading.

I tried to follow your instructions, although the connection is not using key, only passwords. The test still looks simple:

SSHLibrary.Set client configuration width=160 height=80
${Output}= SSHLibrary.Write ssh -o StrictHostKeyChecking=no root@
${Output}= SSHLibrary.Read delay=5s
${Output}= SSHLibrary.Write passwordx
${Output}= SSHLibrary.Read delay=5s

The output of Linux compared to Windows is different (see below), my next step will be to try using RF 6.1

Linux output
Write ssh -o StrictHostKeyChecking=no root@
Output} = ssh -o StrictHostKeyChecking=no root@
Read delay=5s
Warning: Permanently added ‘’ (ECDSA) to the list of known hosts. root@’s password:
${Output} = Warning: Permanently added ‘’ (ECDSA) to the list of known hosts. root@’s password:
Write passwordx
${Output} =
Read delay=5s
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-149-generic x86_64) * Documentation: * Management: * Support: Ubuntu Pro | Ubuntu 225 updates can be installed immediately. 0 of these updates are security updates. To see these additional updates run: apt list --upgradable New release ‘22.04.3 LTS’ available. Run ‘do-release-upgrade’ to upgrade to it. *** System restart required *** Last login: Mon Jan 29 15:08:56 2024 from root@Int10:~#

Windows output
Write ssh -o StrictHostKeyChecking=no root@
[10X ]0;Administrator: C:\Windows\system32\conhost.exe [25l [HMicrosoft Windows [Version 10.0.19045.3930] [K
${Output} = [10X ]0;Administrator: C:\Windows\system32\conhost.exe [25l [HMicrosoft Windows [Version 10.0.19045.3930] [K
Read delay=5s
(c) Microsoft Corporation. All rights reserved. [K [K user1@DESKTOP-D3TQNG8 C:\Users\ user1> [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [4;38H [?25hssh -o StrictHostKeyChecking=no root@
${Output} = (c) Microsoft Corporation. All rights reserved. [K [K user1@DESKTOP-D3TQNG8 C:\Users\ user1> [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K [K …
Write passwordx
No match found for ’ ’ in 10 seconds Output: passwordx.

Same output after upgrade Robot Framework to 6.1.1, SSH library is 3.8.1rc1, using Python 3.8.2 on Windows 10 desktop.

${Output}= SSHLibrary.Read delay=5s

Try to increase this timeout to a much larger number. For example 30s.

I just installed Cygwin and now its working like Linux. Thanks.

Hello Guto,

Could you elaborate a bit more how you fixed your issue ?
I understood that you installed Cygwin on your Windows destination.
Did you also have to change the OpenSSH configuration to point at Cygwin and define it as the default shell ?

Looking forward to your answer. Thank you ! :slight_smile:

After installing Cygwin, I uninstalled OpenSSH Server and made sure that cygsshd service is started.

Ok. I will have a look at that. Thank you :slight_smile: