sftp教程

开始

  • 上传文件和拉取文件工具

使用

  • 连接
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[c:\~]$ sftp root@node0

Connecting to 192.168.80.100:22...
Connection established.
To escape to local shell, press 'Ctrl+Alt+]'.

Your current local directory is
C:\Users\silen\Documents\NetSarang\Xshell\Sessions

Type `help' to browse available commnands.
sftp:/root> help
bye finish your SFTP session
cd change your remote working directory
clear clear screen
exit finish your SFTP session
explore explore your local directory
get download a file from the server to your local machine
help give help
lcd change and/or print local working directory
lls list contents of a local directory
lpwd print your local working directory
ls list contents of a remote directory
mkdir create a directory on the remote server
mv move or rename a file on the remote server
put upload a file from your local machine to the server
pwd print your remote working directory
quit finish your SFTP session
rename move or rename a file on the remote server
rm delete a file
rmdir remove a directory on the remote server
  • 定位本地下载目录
1
sftp:/root> lcd
  • 显示本地目录
1
sftp:/root> lpwd
  • 拉取文件
1
sftp:/root> get spark.tgz D:\downloads\
  • 上传文件
1
sftp:/root> put spark.tgz /root/files
Donate comment here