如何给Linux服务器安装sftp服务

我忘了我怎么搞的了。

先占坑,以后再写吧。

sftp和ftp的区别:

FTP:  基于TCP来传输文件,明文传输用户信息和数据。
SFTP: 基于SSH来加密传输文件,可靠性高,可断点续传。

比较好用的有FileZilla这款软件。
如果想用命令行的话,可以:

sftp -P 端口号 用户名@IP地址

然后在密码不会回显的情况下,输入密码,建立连接。
ls命令可以查看当前目录。

在sftp中下载文件:

get 文件名.后缀 下载保存地址

在sftp中上传文件:

put 文件路径 上传地址

退出sftp模式:

bye

获取全部支持的命令:

help

下表列出一些标准的sftp命令行所支持的命令:

CommandFunction
byeQuit SFTP
cdChange the directory on the remote host.
chmodChange the permissions of files on the remote host.
chownChange the owner of files on the remote host.
exit (or quit)Close the connection to the remote host, and exit SFTP.
getCopy a file from the remote host to the local computer.
help (or ?)Get help on the use of SFTP commands.
lcdChange the directory on the local computer.
llsList the contents of the current directory on the local computer.
lmkdirCreate a directory on the local computer.
ln (or symlink)Create a symbolic link for a file on the remote host.
lpwdShow the present working directory on the local computer.
ls (or dir)List the contents of the current directory on the remote host.
lumaskChange the local umask value.
mkdirCreate a directory on the remote host.
putCopy a file from the local computer to the remote host.
pwdShow the present working directory on the remote host.
renameRename a file on the remote host.
rmDelete a file on the remote host.
rmdirRemove a directory on the remote host (the directory usually has to be empty).
versionDisplay the SFTP version.
!Pop out to the shell prompt to enter other commands. To return to SFTP, enter exit. If you combine ! with a command (for example, !pwd), SFTP executes the command without popping you out to the shell prompt.

下面的截图并不完全,只是作演示用。
截图不完全

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值