Manipulating the known-hosts file for SSH / SFTP-connections

Dear community, I am trying to open and manipulate the file ~/.ssh/known-hosts on a AXC F 2152 (FW 2021.0). Therefore, I connect to the controller from my windows-pc by using ssh. On the command-line of the controller, navigate to the directory .ssh and then open the file file by using vim. The file is opened by vim, but I can’t see any content. The file seems to be empty. When I download the same file via sftp (by using WinSCP), I can open the file on my computer and there I can see the content. My question is: How can I open and manipulate the file directly on the controller (without downloading it to a remote machine)? In the next step, I want to open and write to the file using the Shell-FB from the PLCnextBase-Library. Thanks for your help and regards Fabian

I can open and edit the file /opt/plcnext/.ssh/known_hosts using vi, when I am logged in to the PLC as admin. [quote]I am trying to open and manipulate the file ~/.ssh/known-hosts[/quote]The file name is known_hosts, not known-hosts. Perhaps this is the problem? [quote]I want to open and write to the file using the Shell-FB from the PLCnextBase-Library.[/quote]The Shell FB doesn’t do interactive shell sessions, so you will need to do everything with one command e.g. echo the file contents and redirect the output to the known_hosts file. You will need to change the permissions on the file, though, because by default the file only has write permission for the owner (and the Shell FB does not execute commands as admin).