SecureCRT 实现linux到windows文件及文件夹传输

使用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 in 0 seconds (13 KB/s)
sftp> lls --查看windows目录
rc.local              test1.txt
sftp> 

如果想传文件夹到windows。 则需要先将文件夹压缩下。

tar -cvf /root/xahot.tar /xahot
tar -cvf 打包后生成的文件名全路径 要打包的目录

然后再get xahot.tar

猜你喜欢

转载自blog.csdn.net/qq_35462323/article/details/88795217