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

    • How do I create a log file for Cycle Support?

      When troubleshooting complex Cycle issues often times the most valuable piece of information that can be provided is the Verbose log file. Luckily creating a Verbose log file is easy! Step 1: From the Cycle client menu bar select Edit -> Preferences ...
    • How to store Connections and Credentials in Cycle

      Cycle 2.5 includes the ability to save Connections and Credentials for your systems under test. Using named Connections and Credentials streamlines and simplifies declaring system access, makes Features look cleaner and promotes reusability of “set ...
    • 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 ...
    • Aligning terminal Steps with Operator behavior

      Problem My terminal-based Cycle Steps don't always perfectly coincide with the actions a human operator performs on their device. Solution There are 3 terminal Steps that can provide a clear picture of the business process and end user operation. ...
    • TLS and SSL Errors With Connection Steps in versions Cycle 2.10+

      The Java version shipped with Cycle was updated with the Cycle 2.10 release.   As a result, you may receive error message similar to the example messages below when running steps to establish DB connections in Cycle 2.10+: ...