Depending on the shell of the remote machine, it is usually possible to provide a full command line, including multiple commands and shell directives.The node makes the exit code of the command(s) available as a flow variable. If enabled, the standard out and standard error are similarly captured. Placeholders can be used to insert input and output files or folders into the command string if so desired.
Important Considerations:
sh
shell and refuses execution if none is found. This is done to so that any input and output file/folder paths can be securely passed to the command. In case this enforcement is disabled with the setting in the advanced “Security” settings and no compliant shell is found, then paths are directly inserted into the command string and special characters in them are NOT escaped because the target shell and its quoting and escaping mechanism is unknown. Thus, the paths have to be manually escaped and quoted in the command string to prevent syntax errors and command injection. The “Forbidden Characters” option provides a way to reject paths if they contain certain characters, which is especially important if the paths are provided via flow variable (which is NOT recommended). More information can be found in the relevant option descriptions. CTRL-C
to the target shell and then terminates. Note that a remote command may continue to execute beyond that. This may happen either because the current program ignores the signal, or because the shell jumped to the next specified command. In POSIX this can be avoided by using conditional (&&
) instead of sequential (;
) execution. In either case these commands may have to be canceled manually or with subsequent SSH External Tool nodes. %%inputFile%%
” and “%%outputFile%%
” will be replaced by the paths specified below if desired. Placeholders must be quoted using the target shell's quoting mechanism to prevent unexpected syntax errors or code injection. Normally the node enforces a POSIX compliant sh
shell and provides the paths as the first and second argument respectively, thus placeholders must be quoted using double quotes (""
). The same is true for Windows's cmd.exe. In the case POSIX compliance could not be determined and enforcement is disabled, the file/folder paths will be directly inserted into the command string and are NOT escaped! If the target shell is partially POSIX compliant (like Windows PowerShell or fish), single quotes (''
) should be used to quote the directly inserted file/folder paths. Even if not POSIX compliant, depending on the advanced “Forbidden Characters” option, a path may be rejected before execution if it contains dangerous characters.&&
” on POSIX shells and Windows's cmd.exe.ssh_command_exit
.%%inputFile%%
” in the command with the file or folder specified below.%%outputFile%%
” in the command with the file or folder specified below.sh
shell.<";$`&'|>\
) as well as all ISO control characters.\n
are not supported.You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.
To use this node in KNIME, install the extension KNIME Basic File System Connectors from the below update site following our NodePit Product and Node Installation Guide:
A zipped version of the software site can be downloaded here.
Deploy, schedule, execute, and monitor your KNIME workflows locally, in the cloud or on-premises – with our brand new NodePit Runner.
Try NodePit Runner!Do you have feedback, questions, comments about NodePit, want to support this platform, or want your own nodes or workflows listed here as well? Do you think, the search results could be improved or something is missing? Then please get in touch! Alternatively, you can send us an email to mail@nodepit.com.
Please note that this is only about NodePit. We do not provide general support for KNIME — please use the KNIME forums instead.