服务器间的sftp文件传输,sftp的使用-本地与远程服务器之间的文件传输.docx

本文详细介绍了如何使用SecureCRT通过SFTP进行文件传输,包括设置服务器、选择传输模式、查看文件信息、上传下载文件操作步骤,适合初学者快速上手。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

sftp的使用-本地与远程服务器之间的文件传输

如何将本地pc上的文件通过sftp上传到linux服务器如何将linux服务器上的文件下载到本地pc上SecureCRT 工具:打开会话窗口设置服务器设置本地PC的目录这个地址用于将该目录下的文件进行上传到linux服务器或把linux上的文件下载到该目录下打开sftp窗口(或者使用Alt+P快捷键打开sftp窗口)在sftp窗口执行命令help,查看sftp可使用的命令sftp> helpAvailable commands:ascii Set transfer mode to ASCII (设置文件传输模式为ascii)binary Set transfer mode to binary(设置文件传输模式为二进制)cd pathChange remote directory to 'path' (这个就不用说了吧~ )detail remote-pathDisplay system information about remote file or folder(查看远程服务器上的文件夹详细信息咯)例子sftp> detail ~/huqin /home/mmap/huqin: Type: Directory Size: 280 uid/gid: 500/500 uid/gid: 500/500 Last Modification Time: October 16, 2014 10:35:28 Last Access Time : October 16, 2014 10:36:18 Permissions: drwxrwxr-xsftp>ldetail local-pathDisplay system information about local file or folder(查看本地pc上的文件夹详细信息咯)例子:C:/Users/Administrator/Desktop/snak: Type: Directory Size: 4096 Create Time : October 14, 2014 14:31:54 Last Modification Time: October 16, 2014 10:35:48 Last Access Time : October 16, 2014 10:35:48 File Attributes: no-attributes Link Count: 1sftp>lcd path Change local directory to 'path'(专用于改变本地目录用的喽) 例子:sftp> lpwdC:/Users/Administrator/Desktop/snak #当前本地目录sftp> lcd E:\Work #改变本地目录为E:\Worksftp> lpwd #当前本地目录E:/Worksftp>chgrp group pathChange group of file 'path' to 'group' (改变path所属的组喽)chmod mode pathChange permissions of file 'path' to 'mode' (这个也不用说了吧 改变权限w/r/x之类的了)chown owner pathChange owner of file 'path' to 'owner'(改变档案的拥有者咯)exit Quit sftphelp Display this help textinclude filename Include commands from 'filename' Alternate: < filenameget [-a | -b] remote-path Download file force ascii (-a) or binary (-b) mode例子将我的linux服务器的~/testDir下的文件下载到本地pc上sftp> pwd /home/mmapsftp> cd ~/testDirsftp> pwd/home/mmap/testDirsftp> lpwdC:/Users/Administrator/Desktop/snaksftp> llscontral.txt worm.txtsftp> get -a testFile #-a :以ascii方式下载 -b:以二进制方式下载Downloading testFile from /home/mmap/testDir/testFile 100% 283 bytes 283 bytes/s 00:00:00/home/mmap/testDir/testFil

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值