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

**URL:** <https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737>\
**Category:** SSHLibrary\
**Created:** [29 January 2024 09:28 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737 "2024-01-29T09:28:30Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [29 January 2024 09:28 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/1 "2024-01-29T09:28:30Z")

</div>

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@10.10.20.10
${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@10.10.20.10](mailto:root@10.10.20.10).**

[Its my second issue with SSH and Windows](https://forum.robotframework.org/t/ssh-library-could-not-execute-background-command-on-windows-hos/6699)  
Thanks !

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [29 January 2024 10:04 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/2 "2024-01-29T10:04:54Z")

</div>

> [@Guto](#):
>
> Output: [10X]0;Administrator:

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?

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [29 January 2024 11:00 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/3 "2024-01-29T11:00:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [29 January 2024 11:18 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/4 "2024-01-29T11:18:58Z")

</div>

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?)

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [29 January 2024 11:25 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/5 "2024-01-29T11:25:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [29 January 2024 14:24 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/6 "2024-01-29T14:24:56Z")

</div>

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@10.10.20.10](mailto:root@10.10.20.10)  
> ${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@10.10.20.10](mailto:root@10.10.20.10)  
Output} = ssh -o StrictHostKeyChecking=no [root@10.10.20.10](mailto:root@10.10.20.10)  
**Read delay=5s**  
Warning: Permanently added ‘10.10.205.10’ (ECDSA) to the list of known hosts. [root@10.10.205.10](mailto:root@10.10.205.10)’s password:  
${Output} = Warning: Permanently added ‘10.10.20.10’ (ECDSA) to the list of known hosts. [root@10.10.20.10](mailto:root@10.10.20.10)’s password:  
**Write** passwordx  
${Output} =  
**Read delay=5s**  
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-149-generic x86\_64) \* Documentation: [https://help.ubuntu.com](https://help.ubuntu.com) \* Management: [https://landscape.canonical.com](https://landscape.canonical.com) \* Support: [Ubuntu Pro | Ubuntu](https://ubuntu.com/advantage) 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 172.20.6.19 root@Int10:~#

**Windows output**  
Write ssh -o StrictHostKeyChecking=no [root@10.10.20.10](mailto:root@10.10.20.10)  
[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@10.10.20.10](mailto:root@10.10.20.10)  
${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.

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [30 January 2024 07:24 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/7 "2024-01-30T07:24:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![HelioGuilherme66](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/helioguilherme66/32/34_2.png) [@HelioGuilherme66](https://forum.robotframework.org/u/HelioGuilherme66)\
**Post date:** [30 January 2024 12:47 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/8 "2024-01-30T12:47:12Z")

</div>

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

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

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [30 January 2024 17:05 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/9 "2024-01-30T17:05:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LEcureuil](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@LEcureuil](https://forum.robotframework.org/u/LEcureuil)\
**Post date:** [6 February 2024 13:57 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/10 "2024-02-06T13:57:01Z")

</div>

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 ! 🙂

---

<div class="post-metadata">

**Author:** ![Guto](https://avatars.discourse-cdn.com/v4/letter/g/ecd19e/32.png) [@Guto](https://forum.robotframework.org/u/Guto)\
**Post date:** [6 February 2024 14:37 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/11 "2024-02-06T14:37:33Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![LEcureuil](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@LEcureuil](https://forum.robotframework.org/u/LEcureuil)\
**Post date:** [6 February 2024 14:41 UTC](https://forum.robotframework.org/t/ssh-library-and-windows-destination-using-write-no-match-found/6737/12 "2024-02-06T14:41:57Z")

</div>

Ok. I will have a look at that. Thank you 🙂
