傻子一個

          一路走來~~

           

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

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

          PSCP 的使用

          在控制臺直接執行 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 的使用是很簡單的,把常用的幾個選項說一下:

          -q 安靜模式,傳輸文件時什么也不顯示,否則會顯示出文件的傳輸進度

          -P port 指定服務器的 SSH 端口,注意這個是大寫字母 P,默認是 -P 22,如果主機的 SSH 端口就是 22,就不用指定了 

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

          -pw passwd 指定登錄時所用的口令為: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復制到了主機server上的用戶username所在的主目錄下的upload子目錄中(這個路徑可能是 /home/username/upload)

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

          把本地的 C:\a.txt 復制到主機server的用戶username的主目錄下

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

          把遠程主機server上的用戶username主目錄下的所有 *.tgz 文件拷貝到本地的 c:\download目錄中,如果 SSH 版本是 SSH v1,那這個命令就會出錯。

          posted on 2008-09-03 14:45 老文 閱讀(9690) 評論(0)  編輯  收藏 所屬分類: ubuntu(linux)上應用程序相關

          導航

          常用鏈接

          留言簿(2)

          隨筆分類(29)

          收藏夾(1)

          My Work

          學習文章

          軟件使用

          最新隨筆

          最新評論

          主站蜘蛛池模板: 舒兰市| 道孚县| 梅河口市| 岚皋县| 肥乡县| 泽普县| 海伦市| 和静县| 静乐县| 徐闻县| 新晃| 鸡西市| 阳信县| 丹江口市| 博白县| 江油市| 都兰县| 图木舒克市| 拜泉县| 深州市| 扎赉特旗| 东山县| 中牟县| 呼伦贝尔市| 红桥区| 福贡县| 津市市| 弋阳县| 呈贡县| 慈利县| 长阳| 邳州市| 个旧市| 垣曲县| 浏阳市| 福海县| 嘉荫县| 丰城市| 濮阳市| 旬阳县| 南充市|