欢迎来到天天文库
浏览记录
ID:8965545
大小:89.50 KB
页数:6页
时间:2018-04-13
《使用securecrt的sftp在windows与linux之间传输文件》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、使用SecureCRT的SFTP在WINDOWS与LINUX之间传输文件背景: 有一台主机,安装了windows7,在其安装了virtualbox,然后安装了ubuntu虚拟机。在windows7上安装SecureCRT来ssh连接ubuntu虚拟机。一般在windows上面下载软件,然后通过vsftp上传到ubuntu虚拟机上。但是这样非常麻烦,现在考虑使用sftp协议来直接传输。方案: 使用SecureCRT软件ssh连接到ubuntu虚拟机。然后在SecureCRT上面打开SFTP会话,如下图所示: SFTP命令 进入到sftp命令窗口以后,就可以通过sftp命令来进行文
2、件互传的操作。下面主要介绍一下sftp命令的含义。sftp>helpAvailablecommands:asciiSettransfermodetoASCIIbinarySettransfermodetobinarycdpathChangeremotedirectoryto'path'lcdpathChangelocaldirectoryto'path'detailremote-pathDisplaysysteminformationaboutremotefileorfolderldetaillocal-pathDisplaysysteminformationaboutlocalfile
3、orfolderchgrpgrouppathChangegroupoffile'path'to'group'chmodmodepathChangepermissionsoffile'path'to'mode'chownownerpathChangeowneroffile'path'to'owner'exitQuitsftphelpDisplaythishelptextincludefilenameIncludecommandsfrom'filename'Alternate:4、-b]remote-pathDownloadfile-rdownloadsd5、irectoryrecursivelyforceascii(-a)orbinary(-b)modeln[-s]existingpathlinkpathHardlink/symlinkremotefilels[options][path]Displayremotedirectorylistinglls[options][path]DisplaylocaldirectorylistingmkdirpathCreateremotedirectorylmkdirpathCreatelocaldirectorymvoldpathnewpathMoveremotefilelmvoldpathnewp6、athMovelocalfileopen[user@]host[:port]Connecttoremotehostput[-r][-a7、-b]local-pathUploadfile-ruploadsdirectoryrecursivelyforceascii(-a)orbinary(-b)modepwdDisplayremoteworkingdirectorylpwdPrintlocalworkingdirectoryquitQuitsftprenameoldnamenewnameRenameremotefilelrenameoldnamenewnameRenamelocalfiler8、mdirpathRemoveremotedirectorylrmdirpathRemovelocaldirectoryrmpathDeleteremotefilelrmpathDeletelocalfilesuusernameSubstitutesthecurrentuserThisisonlysupportedwithVShellforWindows3.5orlater.type[transfer-mode]Displayorsetfiletransfermodeviewremote-pathDownloadandopenfileversionDisplayprotocolversio9、n翻译一下就是:sftp--help可用命令:cd路径更改远程目录到“路径”lcd路径更改本地目录到“路径”chgrpgrouppath将文件“path”的组更改为“group”chmodmodepath将文件“path”的权限更改为“mode”chownownerpath将文件“path”的属主更改为“owner”exit退出sftphelp显示这个帮助文本get远程路径下载文件lnexistingpathlinkpath符号链接
4、-b]remote-pathDownloadfile-rdownloadsd
5、irectoryrecursivelyforceascii(-a)orbinary(-b)modeln[-s]existingpathlinkpathHardlink/symlinkremotefilels[options][path]Displayremotedirectorylistinglls[options][path]DisplaylocaldirectorylistingmkdirpathCreateremotedirectorylmkdirpathCreatelocaldirectorymvoldpathnewpathMoveremotefilelmvoldpathnewp
6、athMovelocalfileopen[user@]host[:port]Connecttoremotehostput[-r][-a
7、-b]local-pathUploadfile-ruploadsdirectoryrecursivelyforceascii(-a)orbinary(-b)modepwdDisplayremoteworkingdirectorylpwdPrintlocalworkingdirectoryquitQuitsftprenameoldnamenewnameRenameremotefilelrenameoldnamenewnameRenamelocalfiler
8、mdirpathRemoveremotedirectorylrmdirpathRemovelocaldirectoryrmpathDeleteremotefilelrmpathDeletelocalfilesuusernameSubstitutesthecurrentuserThisisonlysupportedwithVShellforWindows3.5orlater.type[transfer-mode]Displayorsetfiletransfermodeviewremote-pathDownloadandopenfileversionDisplayprotocolversio
9、n翻译一下就是:sftp--help可用命令:cd路径更改远程目录到“路径”lcd路径更改本地目录到“路径”chgrpgrouppath将文件“path”的组更改为“group”chmodmodepath将文件“path”的权限更改为“mode”chownownerpath将文件“path”的属主更改为“owner”exit退出sftphelp显示这个帮助文本get远程路径下载文件lnexistingpathlinkpath符号链接
此文档下载收益归作者所有