国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

linux拷貝命令之高級拷貝scp命令詳解

2019-11-02 15:56:04
字體:
來源:轉載
供稿:網友

Linux命令scp

scp ― secure copy (remote file copy program):她是一個安全的遠程文件拷貝程序。

SYNOPSIS :語法如下

scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program]

[[user@]host1:]file1 ... [[user@]host2:]file2

看到上面各種參數、選項蒙了吧。不過,沒有關系,我們化整為零,一個一個來分析。

其實,這個命令和我們平時使用的cp 十分的相似。

scp 最簡單的用法就是 scp [[user@]host1:]file1 ... [[user@]host2:]file2 ,能看懂么?

看不懂也沒有關系,舉個例子吧: 我要從192.168.1.2的Linux 主機的/home/oracle/*.tar 文件 拷貝到 192.168.1.3 的Linux主機的 /home/siebel下,就可以仿照上面的格式寫成:

scp oracle@192.168.1.2:/home/oracle/*.tar  siebel@192.168.1.3:/siebel/

輸入完了以上命令,回車換行確認,可能會讓你輸入口令,根據提示輸入口令吧。

第一次執行的時候,出現如下錯誤:ssh: connect to host 192.168.1.99 port 22: Connection refused, 于是將 sshd 程序啟動,執行腳本: # /etc/init.d/sshd start, 成功解決以上問題。

至于該命令的其他參數,平時工作之中基本用不到,所以,不舉例了,簡單給大家翻譯一下吧,以做參考。

DESCRIPTION : 描述

scp copies files between hosts on a network.  It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1).  Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.

scp 在網絡主機之間拷貝數據,她使用ssh(1)來進行數據傳輸,同時使用相同的安全驗證方式。不象 rcp(1), scp 在必要的時候,會詢問口令。

The options are as follows:

具體的選項如下所示:

-1 Forces scp to use protocol 1.

   強制 scp 使用協議1

-2 Forces scp to use protocol 2.

強制 scp 使用協議2

-3 Copies between two remote hosts are transferred through the local host.Without this option the data is copied

 directly between the two remote hosts.Note that this option disables the progress meter.

通過本機主機在兩個遠程主機之間傳輸數據。沒有這個選項,數據將直接在遠程主機間拷貝數據。 注意:這個選項不支持進度條顯示。

-4 Forces scp to use IPv4 addresses only.

強制scp只使用IPV4地址。

-6 Forces scp to use IPv6 addresses only.

 強制scp只使用IPV6地址。

-B Selects batch mode (prevents asking for passwords or passphrases).

 使用批量模式(避免詢問密鑰或者口令)

-C Compression enable.Passes the -C flag to ssh(1) to enable compression.

啟用壓縮。傳遞-C參數給SSH以啟用壓縮

-c cipher

 Selects the cipher to use for encrypting the data transfer.This option is directly passed to ssh(1).

 選擇密碼加密數據傳輸,這個選項被直接傳遞給ssh(1)。

-F ssh_config

 Specifies an alternative per-user configuration file for ssh.This option is directly passed to ssh(1).

為ssh指定一個交互的用戶配置文件,這個選項被直接傳遞給ssh(1)。

-l limit

 Limits the used bandwidth, specified in Kbit/s.

 限制使用的帶寬,以Kb為單位。

-P port
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 加查县| 阳山县| 紫云| 辽源市| 上饶市| 平远县| 明水县| 黑水县| 景泰县| 临邑县| 甘泉县| 浪卡子县| 库车县| 报价| 沂水县| 犍为县| 辰溪县| 鹤山市| 新化县| 乌海市| 泸定县| 饶阳县| 乌兰县| 唐河县| 剑河县| 牟定县| 达拉特旗| 龙口市| 宜宾市| 永德县| 阜城县| 高雄县| 德化县| 泰州市| 宁安市| 黔西| 河曲县| 桃江县| 襄垣县| 商南县| 西贡区|