傻子一個(gè)

          一路走來~~

           

          PuTTY 提供的文件傳輸工具PSCP (PuTTY Secure Copy client) 基本使用說明

          通過 SSH 連接,在兩臺(tái)機(jī)器之間安全的傳輸文件,可以用于任何 SSH(包括 SSH v1、SSH v2) 服務(wù)器。

          PSCP 的使用

          在控制臺(tái)直接執(zhí)行 pscp 可以看到幫助


          C:\>pscp

          PuTTY Secure Copy client

          Release 0.58

          Usage: pscp [options] [user@]host:source target

                pscp [options] source [source] [user@]host:target

                pscp [options] -ls [user@]host:filespec

          Options:

           -V       print version information and exit

           -pgpfp   print PGP key fingerprints and exit

           -p       preserve file attributes

           -q       quiet, don't show statistics

           -r       copy directories recursively

           -v       show verbose messages

           -load sessname Load settings from saved session

           -P port  connect to specified port

           -l user  connect with specified username

           -pw passw login with specified password

           -1 -2    force use of particular SSH protocol version

           -4 -6    force use of IPv4 or IPv6

           -C       enable compression

           -i key   private key file for authentication

           -batch   disable all interactive prompts

           -unsafe  allow server-side wildcards (DANGEROUS)

           -sftp    force use of SFTP protocol

           -scp     force use of SCP protocol

          可以看出 PSCP 的使用是很簡(jiǎn)單的,把常用的幾個(gè)選項(xiàng)說一下:

          -q 安靜模式,傳輸文件時(shí)什么也不顯示,否則會(huì)顯示出文件的傳輸進(jìn)度

          -P port 指定服務(wù)器的 SSH 端口,注意這個(gè)是大寫字母 P,默認(rèn)是 -P 22,如果主機(jī)的 SSH 端口就是 22,就不用指定了 

          -l user 指定以哪個(gè)用戶的身份登錄主機(jī),用戶名稱也可以和主機(jī)名稱寫在一起,用@分割開,比如:username@server 

          -pw passwd 指定登錄時(shí)所用的口令為:passwd

          -C 表示允許壓縮傳輸,提高傳輸速度

          PSCP 基本用法是:

          pscp -P 22 -C c:\a.txt username@server:/path/ 

          例子:

          1、c:\>pscp -C c:\a.bat username@server:upload/

          就是把本地的c:\a.bat復(fù)制到了主機(jī)server上的用戶username所在的主目錄下的upload子目錄中(這個(gè)路徑可能是 /home/username/upload)

          2、c:\>pscp -C c:\a.txt username@server:.

          把本地的 C:\a.txt 復(fù)制到主機(jī)server的用戶username的主目錄下

          3、c:\>pscp -C username@server:*.tgz c:\download

          把遠(yuǎn)程主機(jī)server上的用戶username主目錄下的所有 *.tgz 文件拷貝到本地的 c:\download目錄中,如果 SSH 版本是 SSH v1,那這個(gè)命令就會(huì)出錯(cuò)。

          posted on 2008-09-03 14:45 老文 閱讀(9688) 評(píng)論(0)  編輯  收藏 所屬分類: ubuntu(linux)上應(yīng)用程序相關(guān)


          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

          導(dǎo)航

          常用鏈接

          留言簿(2)

          隨筆分類(29)

          收藏夾(1)

          My Work

          學(xué)習(xí)文章

          軟件使用

          最新隨筆

          最新評(píng)論

          主站蜘蛛池模板: 虹口区| 会理县| 司法| 济宁市| 浦东新区| 蒙城县| 浦江县| 安溪县| 香河县| 马龙县| 怀宁县| 贡嘎县| 梅河口市| 湖州市| 商洛市| 右玉县| 城固县| 遂昌县| 大新县| 新晃| 普陀区| 灌阳县| 加查县| 大荔县| 镇沅| 台中市| 玉田县| 襄垣县| 黄浦区| 祁连县| 应用必备| 乌拉特后旗| 棋牌| 楚雄市| 根河市| 宜州市| 丰城市| 丹阳市| 巨野县| 吉木萨尔县| 镇原县|