使用secureCRT的sftp命令实现,windows与linux文件的互传。
首先使用SecureCRT软件ssh连接到ubuntu虚拟机。然后在SecureCRT上面打开SFTP会话,如下图所示:
sftp对话框里,会用到的命令大概有这几个:
cd 路径 更改远程目录到“路径”
lcd 路径 更改本地目录到“路径”
ls [选项] [路径] 显示远程目录列表
lls [选项] [路径] 显示本地目录列表
put 本地路径 上传文件
get 远程路径 下载文件
put操作实现windows->linux传输
sftp> pwd
/root
sftp> lpwd
D:/dukang/
sftp> lcd D:/dukang/test --切换目录
sftp> lls
rc.local
sftp> ls
test1.txt
sftp> get test1.txt --下载文件到windows
Downloading Graphs.pm from /root/test1.txt
100% 13KB 13KB/s 00:00:00
/root/test1.txt: 13503 bytes transferred