在 Linux 下,可以使用多种 SFTP 客户端 来连接和管理远程服务器。下面按命令行和图形界面分类说明:
sftp(系统自带)OpenSSH 自带,最常用:
sftp user@host
sftp -P 2222 user@host
进入后可用:
ls
cd
get file
put file
scp(类似 SFTP,更简单)适合单文件传输:
scp file user@host:/path
scp user@host:/path/file .
rsync(推荐,支持断点、增量)rsync -avz -e ssh file user@host:/path
lftp功能强大,支持 SFTP / FTP / HTTP:
lftp sftp://user@host
curl / wget适合脚本:
curl -u user:pass sftp://host/path/file -o local
sudo apt install filezilla
支持 SFTP、FTP、FTPS
Linux 上一般不用
直接输入:
sftp://user@host
适合桌面用户
界面友好,支持 SFTP、S3、云存储
sshfssshfs user@host:/remote/path /local/mount
mc):终端双栏文件管理| 场景 | 推荐 |
|---|---|
| 快速传输 | scp / sftp |
| 批量/脚本 | rsync |
| 桌面用户 | FileZilla / 文件管理器 |
| 挂载使用 | sshfs |
如果你是 服务器无桌面环境 或 想脚本自动化,可以告诉我使用场景,我可以直接给你示例命令。