Skip to content

SSH#

SSH 节点用于使用安全外壳协议 (SSH) 执行命令。

¥The SSH node is useful for executing commands using the Secure Shell Protocol.

Credentials

你可以在 此处 中找到此节点的身份验证信息。

¥You can find authentication information for this node here.

操作#

¥Operations

¥Execute a command

¥Download a file

¥Upload a file

Uploading files

要附加文件进行上传,你需要使用额外的节点(例如 从磁盘读取/写入文件 节点或 HTTP 请求 节点)将文件作为数据属性传递。

¥To attach a file for upload, you will need to use an extra node such as the Read/Write Files from Disk node or the HTTP Request node to pass the file as a data property.

执行命令#

¥Execute Command

使用以下参数配置此操作:

¥Configure this operation with these parameters:

  • 用于连接的凭据:选择一个现有的 SSH 凭据 对象或创建一个新的 SSH 凭据 对象来连接。

¥Credential to connect with: Select an existing or create a new SSH credential to connect with.

  • 命令:输入要在远程设备上执行的命令。

¥Command: Enter the command to execute on the remote device.

  • 工作目录:请输入 n8n 执行命令的目录。

¥Working Directory: Enter the directory where n8n should execute the command.

下载文件#

¥Download File

  • 用于连接的凭据:选择一个现有的 SSH 凭据 对象或创建一个新的 SSH 凭据 对象来连接。

¥Credential to connect with: Select an existing or create a new SSH credential to connect with.

  • 路径:输入要下载的文件的路径。此路径必须包含文件名。下载的文件将使用此文件名。要使用不同的名称,请使用“文件名”选项。有关更多信息,请参阅 下载文件选项

¥Path: Enter the path for the file you want to download. This path must include the file name. The downloaded file will use this file name. To use a different name, use the File Name option. Refer to Download File options for more information.

  • 文件属性:输入保存要下载的二进制数据的对象属性名称。

¥File Property: Enter the name of the object property that holds the binary data you want to download.

下载文件选项#

¥Download File options

你可以使用“文件名”选项进一步配置此操作。使用此选项可将二进制数据文件名替换为你选择的名称。

¥You can further configure this operation with the File Name option. Use this option to override the binary data file name to a name of your choice.

上传文件#

¥Upload File

  • 用于连接的凭据:选择一个现有的 SSH 凭据 对象或创建一个新的 SSH 凭据 对象来连接。

¥Credential to connect with: Select an existing or create a new SSH credential to connect with.

  • 输入二进制字段:输入包含要上传的文件的输入二进制字段名称。

¥Input Binary Field: Enter the name of the input binary field that contains the file you want to upload.

  • 目标目录:要上传文件的目录。文件名取自二进制数据文件名。要输入不同的名称,请使用“文件名”选项。有关更多信息,请参阅 上传文件选项

¥Target Directory: The directory to upload the file to. The name of the file is taken from the binary data file name. To enter a different name, use the File Name option. Refer to Upload File options for more information.

上传文件选项#

¥Upload File options

你可以使用“文件名”选项进一步配置此操作。使用此选项可将二进制数据文件名替换为你选择的名称。

¥You can further configure this operation with the File Name option. Use this option to override the binary data file name to a name of your choice.

模板和示例#

¥Templates and examples

Template widget placeholder.