sftp 上传下载 命令介绍

您所在的位置:网站首页 ftp文件上传命令 sftp 上传下载 命令介绍

sftp 上传下载 命令介绍

#sftp 上传下载 命令介绍| 来源: 网络整理| 查看: 265

sftp是Secure FileTransferProtocol的缩写,安全文件传送协议。可以为传输文件提供一种安全的加密方法。sftp与 ftp有着几乎一样的语法和功能。SFTP为 SSH的一部分,是一种传输档案至Blogger伺服器的安全方式。其实在SSH软件包中,已经包含了一个叫作SFTP(Secure File TransferProtocol)的安全文件传输子系统,SFTP本身没有单独的守护进程,它必须使用sshd守护进程(端口号默认是22)来完成相应的连接操作,所以从某种意义上来说,SFTP并不像一个服务器程序,而更像是一个客户端程序。SFTP同样是使用加密传输认证信息和传输的数据,所以,使用SFTP是非常安全的。但是,由于这种传输方式使用了加密/解密技术,所以传输效率比普通的FTP要低得多,如果您对网络安全性要求更高时,可以使用SFTP代替FTP。

sftp 连接 在shell命令下:sftp [email protected] 意思是已root用户名连接 120.110.7.119 服务器, 随后要你输入root 对应的密码。输入正确后就连接上了

sftp 下载文件到本地服务器 命令:sftp> get /etc/supervisor/file.conf   /etc/supervisord.d,意思是从120.110.7.119服务器的 /etc/supervisor 目录下的 file.conf 文件下载到了 本地服务器的 /etc/supervisord.d 目录下

sftp 下载文件夹到本地服务器 命令:sftp> get -r /home/data   /home/my ,加上 -r 标记,表示从远程服务器的 /home/data 文件夹下载到本地服务器的 /home/my 目录下。

sftp 上传文件到远程服务器 sftp> put /home/fuyatao/downloads/Linuxgl.pdf   /var/www/fuyatao/ 即将本地的Linuxgl.pdf 文件上传到 远程的 /var/www/fuyatao 目录下

sftp 上传文件夹到远程服务器 sftp> put /home/fuyatao   /var/www/fuyatao/ 即将本地的 fuyatao 文件夹上传到 远程的 /var/www/fuyatao 目录下

更多命令可以输入 help 查看

Available commands: bye Quit sftp cd path Change remote directory to 'path' chgrp grp path Change group of file 'path' to 'grp' chmod mode path Change permissions of file 'path' to 'mode' chown own path Change owner of file 'path' to 'own' df [-hi] [path] Display statistics for current directory or filesystem containing 'path' exit Quit sftp get [-afPpRr] remote [local] Download file reget [-fPpRr] remote [local] Resume download file reput [-fPpRr] [local] remote Resume upload file help Display this help text lcd path Change local directory to 'path' lls [ls-options [path]] Display local directory listing lmkdir path Create local directory ln [-s] oldpath newpath Link remote file (-s for symlink) lpwd Print local working directory ls [-1afhlnrSt] [path] Display remote directory listing lumask umask Set local umask to 'umask' mkdir path Create remote directory progress Toggle display of progress meter put [-afPpRr] local [remote] Upload file pwd Display remote working directory quit Quit sftp rename oldpath newpath Rename remote file rm path Delete remote file rmdir path Remove remote directory symlink oldpath newpath Symlink remote file version Show SFTP version !command Execute 'command' in local shell ! Escape to local shell ? Synonym for help


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3