Xshell中如何如何使用SFTP转移文件

想必大家都知道,SFTP是基于SSH的文件传输协议,与ZMODEM相比具有更加安全且更为快速的文件传输功能。您可以使用sftp的命令从本地Xshell提示转移文件,下面就一起来学习具体操作技巧。

Xshell软件获取地址:http://www.xshellcn.com/xiazai.html

1、 使用以下的sftp命令连接到服务器,文件将被转移:

sftp [user@]host [port]

Example of command line)

Xshell> sftp myhostname

Xshell> sftp myusername@myhostname

Xshell> sftp myusername@myhostname 12345

2、 sftp提示,“帮助”命令列出一组可用的sftp命令:

sftp:/home/myusername> 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

sftp:/home/myusername>

 

3、 以下是上传文件的样本操作:

1)使用的cd命令搬到一个你想上传文件的目录。 (服务器)

2)使用“液晶”命令搬到一个目录文件,将上传、保存。 (窗口)

3)检查文件名用“get”命令。

4)开始上传用“put”命令。

如果已经安装Xftp, Xshell可以创建一个Xftp会话,可以更容易和更安全的完成文件传输。 至于如何使用请参考: 如何在xshell当前会话中打开xftp?

以上教程参考自:http://www.xshellcn.com/zhishi/sftp-cs2.html

猜你喜欢

转载自my.oschina.net/u/3331410/blog/1793390