New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Commander
Commander
986 views

The known_hosts file couldn't be set

Jump to solution

I am trying to issue a SSH command from my workflow, but I get this error:

The known_hosts file couldn't be set

How can I resolve this?

Tags (2)
0 Likes
1 Solution

Accepted Solutions
Admiral
Admiral

How is your knownHostsPolicy input set? You should play with this one according to the needs.

Do not ignore the Notes section within the SSH commnad description, in particular No. 2 described there which states:

2. Hidden inputs:
knownHostsPath - Specifies the path to the known_hots file on the running server.
Default value: <user.home>/.ssh/known_hosts

If you did not change that one and if you choosed an host policy option that alters this file you might be in an access denied situation on that specific file.

Is this error appearing when you run the SSH command in Studio or Central?

Andrei Vasile Truta

View solution in original post

2 Replies
Admiral
Admiral

How is your knownHostsPolicy input set? You should play with this one according to the needs.

Do not ignore the Notes section within the SSH commnad description, in particular No. 2 described there which states:

2. Hidden inputs:
knownHostsPath - Specifies the path to the known_hots file on the running server.
Default value: <user.home>/.ssh/known_hosts

If you did not change that one and if you choosed an host policy option that alters this file you might be in an access denied situation on that specific file.

Is this error appearing when you run the SSH command in Studio or Central?

Andrei Vasile Truta

View solution in original post

Highlighted
Commander
Commander

knownHostsPolicy  was set to strict. I changed it to add, and now it works fine.

Thanks!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.