My SSH terminal connections are failing in Cycle with error adding to known hosts file.

My SSH terminal connections are failing in Cycle with error adding to known hosts file.


My SSH terminal connections are failing in Cycle with error adding to known hosts file.


SSH terminal connections use a known_hosts file stored in the user’s home directory to store server information when you establish an SSH connection.

Cycle is unable to create/write to the known_hosts file if your user directory does not already have a “.ssh” directory created within it. You will see an error message similar to the one below.


The following steps can be followed to create a “.ssh” directory in your Windows user home directory.


1. Open the Windows command prompt

Press Windows key + R to open the run dialog.

Type “cmd.exe” and press Enter or click OK



2. Navigate to your user’s home directory

The command prompt may open in your user’s home directory automatically depending on your operating system and system configuration, or you may need to navigate to your home directory.

Depending on your version of Windows and the system config you may be able to easily navigate to your home directory using the following command.




If that does not work, you may need to enter the entire path of your home directory, replacing <USER_NAME> with your Windows user name.

cd \Users\<USER_NAME>



3. Check to see if the .ssh directory already exists

Run the command below to check your home directory for an existing .ssh directory. You should get a “File Not Found” message. If there is already an existing .ssh directory, then you may be facing a different issue causing your SSH connections to fail.

dir .ssh



4. Create a .ssh directory

Run the command below to create a .ssh directory. You can then run “dir .ssh” to confirm it is created.

 mkdir .ssh



5. Run your feature again

Run your feature again. You should not get the same error message indicating Cycle is unable to add to the known hosts file. Cycle will create a known_hosts file in the “.ssh” directory you just created.

    • Related Articles

    • Terminal Hangs or Does Not Open

      Problem My terminal appears to hang or returns unexpected results when using the Cycle step to open a terminal connection. Potential Issues and Solutions There are several common issues that can cause failures when opening a terminal in your Cycle ...
    • Connection Refused error opening native apps

      Problem I receive the error: “Connection refused…” when attempting to open a native app using Cycle. Solution The “Connection refused...” error occurs when there is an issue with the WinAppDriver Cycle is attempting to use. The following guide walks ...
    • “Unexpected Response from the license server. Status code 590...” while logging into Cycle

      (This article is applicable to Cycle 2.5.0 and earlier versions) Problem  I receive the error: "Unexpected Response from the license server. Status code 590..." while trying to log into Cycle. Solution A status code 590 occurs when Cycle is unable to ...
    • My web-based Cycle tests are failing.

      Problem My browser-based Cycle Features are failing. Solution Check that the following common mistakes are not causing your failures: 1. Opening the browser first Any browser-based Steps in Cycle should be preceded in their Scenario with: I open ...
    • "Unexpected 302 status code received from MOCA server."

      Problem  I receive the error: "Unexpected 302 status code received from MOCA server." while trying to connect to a JDA WMS cloud instance in Cycle. Solution This error occurs when the cloud URL is used without /service on the end of the connection ...