这是最推荐的方式,操作直观且安全(可通过加密保护密码)。
Ctrl+S)。ftp.example.com或IP);适用于习惯命令行或需要批量配置的用户,但需注意文件权限安全。
nano ~/.config/filezilla/filezilla.xml
(若.config/filezilla目录不存在,可先运行mkdir -p ~/.config/filezilla创建)。<Servers>标签内,找到目标服务器的<Server>节点(若无则新建),添加或修改以下内容:<Server>
<Host>ftp.example.com</Host>
<Port>21</Port>
<Protocol>FTP - File Transfer Protocol</Protocol>
<Username>your_username</Username>
<Password>your_password</Password>
<LogonType>Normal</LogonType>
<SavePassword>true</SavePassword>
</Server>
<Host>:服务器地址;<Port>:FTP端口(默认21,若使用SFTP则为22,需与协议匹配);<LogonType>:设为Normal(正常登录,需输入用户名密码);<SavePassword>:设为true(保存密码)。Ctrl+X→Y→Enter保存文件。chmod 600 ~/.config/filezilla/filezilla.xml
chmod 600);通过以上两种方法,即可在Ubuntu上实现FileZilla的自动登录。图形界面方式适合大多数用户,而配置文件方式则更适合高级用户或需要批量管理的场景。