使用SecureCRT远程登陆服务器。
1.打开SFTP : 快捷方式 Alt + P 打开SFTP 或者 直接打开
2.常用命令:
open [user@]host[:port] Connect to remote host
get [-r][-a | -b] remote-path Download file
-r downloads directory recursively
force ascii (-a) or binary (-b) mode
(get--下载文件)
put [-r][-a | -b] local-path Upload file
-r uploads directory recursively
force ascii (-a) or binary (-b) mode
(上传文件)
pwd Display remote working directory(显示远程服务器文件存储路径)
lpwd Print local working directory(显示本地pc机文件存储路径)
quit Quit sftp
例如:
# cd /root
# dir
hosts
/root中有hosts这个文件。
sftp> get hosts
Downloading hosts from /root/hosts
100% 194 bytes 194 bytes/s 00:00:00
/root/hosts: 194 bytes transferred in 0 seconds (194 bytes/s)
在到本地pc机上可以看到刚才下载的hosts文件。