sftp命令 – 交互式的文件传输程序

sftp命令全称是Secure File Transfer Protocol。是一款交互式的文件传输程序,sftp命令的运行和使用方式与ftp命令相似,但是,sftp命令对传输的所有信息使用ssh加密,它还支持公钥认证和压缩等功能。

语法格式: sftp [参数] [IP或主机名]

常用参数:

-B指定传输文件时缓冲区的大小
-l使用ssh协议版本1
-b指定批处理文件
-C使用压缩
-o指定ssh选项
-F指定ssh配置文件
-R指定一次可以容忍多少请求数
-v升高日志等级

参考实例

使用sftp命令链接到服务器:

[root@proyy.com ~]# sftp 192.168.20.29
The authenticity of host '192.168.20.29 (192.168.20.29)' can't be established.
RSA key fingerprint is SHA256:asdfghjkl123455678.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.20.29' (RSA) to the list of known hosts.
Password:
Connected to 192.168.20.29.
sftp> 

指定传输文件是缓冲区大小:

[root@proyy.com ~]# sftp -B 512 192.168.20.29
Password: 

在传输过程中使用压缩:

[root@proyy.com ~]# sftp -C 192.168.20.29
Password: 
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享