在Ubuntu系统中,使用SFTP(SSH File Transfer Protocol)上传文件到远程服务器是一个常见的操作。以下是详细的步骤指南:
打开终端:
Ctrl + Alt + T 快捷键来打开终端。连接到远程服务器:
sftp 命令连接到远程服务器。假设服务器的IP地址是 192.168.1.100,用户名是 your_username,命令如下:sftp your_username@192.168.1.100 上传文件:
put 命令上传文件。假设你要上传本地文件 /path/to/local/file.txt 到远程服务器的 /path/to/remote/directory/ 目录下,命令如下:put /path/to/local/file.txt /path/to/remote/directory/ mkdir -p /path/to/remote/directory/ 退出SFTP会话:
exit 命令退出SFTP会话:exit 下载并安装FileZilla:
sudo apt update sudo apt install filezilla 启动FileZilla:
filezilla 并按回车键启动FileZilla。配置连接:
上传文件:
关闭连接:
通过以上两种方法,你可以在Ubuntu系统中轻松地使用SFTP上传文件到远程服务器。选择适合你的方法进行操作即可。