SFTP 在所有包含 SSH 访问的主机套餐上可用,即 Premium 及以上套餐。步骤如下:

步骤 1 – 准备

首先,确保:
- 已启用 SSH 访问。
- 设备已安装 FileZilla 客户端版本。

步骤 2 – 连接

可通过以下任一方式连接 SFTP:

方式 1 – 直接访问

Hostinger SSH Access showing SSH details: IP, port, username, and password change option
Hostinger SSH Access showing SSH details: IP, port, username, and password change option
FileZilla Quickconnect bar with host, username, password, and port fields highlighted
FileZilla Quickconnect bar with host, username, password, and port fields highlighted
SFTP host key prompt with “Always trust this host” checkbox and OK button highlighted
SFTP host key prompt with “Always trust this host” checkbox and OK button highlighted

打开 FileZilla,在快速连接(Quickconnect)区域填入 SSH Access 部分的配置:
- 主机(Host):SSH Access 部分的 FTP IP
- 用户(User):FTP/SSH 用户名
- 端口(Port):65002

点击“快速连接(Quickconnect)”即可连接到 FTP 服务器。若出现 Unknown host key 提示,勾选 Always trust this host 并点击 OK。

方式 2 – 站点管理器

FileZilla toolbar and host field highlighted for SFTP connection setup
FileZilla toolbar and host field highlighted for SFTP connection setup
New site button highlighted in a file manager dialog
New site button highlighted in a file manager dialog
SFTP protocol selected in a host connection settings dropdown
SFTP protocol selected in a host connection settings dropdown
Hostinger SSH Access and FileZilla SFTP setup showing host, port, and username fields highlighted
Hostinger SSH Access and FileZilla SFTP setup showing host, port, and username fields highlighted

与直接访问不同,站点管理器(Site Manager)可保存之前的连接信息并更改加密类型。

打开 FileZilla 的站点管理器,点击“New Site”,选择 SFTP 连接,填入 SSH Access 或 Remote Access 部分的配置:
- 协议(Protocol):SFTP – SSH File Transfer Protocol
- 主机(Host):FTP Accounts 部分的 FTP IP(例如 185.185.185.185)
- 端口(Port):65002
- 登录类型(Logon type):Normal
- 用户(User):FTP/SSH 用户名

点击“Connect”即可连接服务器。

注意:SFTP/SSH 密码与主域名的 FTP 密码相同。若不确定具体值,可为 FTP 和 SSH 重新设置密码,或创建仅 SSH 密码。

来源:Hostinger 官方帮助文档