Where is a known_hosts file created on by SSH operations?

  • KM02895062
  • 31-Jul-2017
  • 21-May-2021

Summary

A known_hosts file is created as /.ssh/known_hosts by default.

Question

An SSH related operation like an 'SSH Command' operation in Base CP creates or refers to a known_hosts file depending on a value of the 'knownHostsPolicy' step input.
Where is a known_hosts file created on or referred to by such an operation?

Answer

By default, known_hosts file is created as and referred to <user.home>/.ssh/known_hosts, where <user.home> is the home directory/folder of an OS user who is running Central, RAS or Studio.

You are able to change the default path to a known_hosts file by adding a hidden 'knownHostsPath' step input.