scp命令
Linux scp 命令用于 Linux 之間復(fù)制文件和目錄。
scp 是 secure copy 的縮寫, scp 是 linux 系統(tǒng)下基于 ssh 登陸進(jìn)行安全的遠(yuǎn)程文件拷貝命令。
scp 是加密的,rcp?是不加密的,scp 是 rcp 的加強(qiáng)版。
一、Linux scp 命令
以下是scp命令常用的幾個(gè)選項(xiàng):
- -1: 強(qiáng)制scp命令使用協(xié)議ssh1
- -2: 強(qiáng)制scp命令使用協(xié)議ssh2
- -4: 強(qiáng)制scp命令只使用IPv4尋址
- -6: 強(qiáng)制scp命令只使用IPv6尋址
- -B: 使用批處理模式(傳輸過(guò)程中不詢問(wèn)傳輸口令或短語(yǔ))
- -C: 允許壓縮。(將-C標(biāo)志傳遞給ssh,從而打開(kāi)壓縮功能)
- -p:保留原文件的修改時(shí)間,訪問(wèn)時(shí)間和訪問(wèn)權(quán)限。
- -q: 不顯示傳輸進(jìn)度條。
- -r: 遞歸復(fù)制整個(gè)目錄。
- -v:詳細(xì)方式顯示輸出。scp和ssh(1)會(huì)顯示出整個(gè)過(guò)程的調(diào)試信息。這些信息用于調(diào)試連接,驗(yàn)證和配置問(wèn)題。
- -c cipher: 以cipher將數(shù)據(jù)傳輸進(jìn)行加密,這個(gè)選項(xiàng)將直接傳遞給ssh。
- -F ssh_config: 指定一個(gè)替代的ssh配置文件,此參數(shù)直接傳遞給ssh。
- -i identity_file: 從指定文件中讀取傳輸時(shí)使用的密鑰文件,此參數(shù)直接傳遞給ssh。
- -l limit: 限定用戶所能使用的帶寬,以Kbit/s為單位。
- -o ssh_option: 如果習(xí)慣于使用ssh_config(5)中的參數(shù)傳遞方式,
- -P port:注意是大寫的P, port是指定數(shù)據(jù)傳輸用到的端口號(hào)
- -S program: 指定加密傳輸時(shí)所使用的程序。此程序必須能夠理解ssh(1)的選項(xiàng)。
①?gòu)?本地 復(fù)制到 遠(yuǎn)程文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-695538.html
* 復(fù)制文件:
* 命令格式:
scp local_file remote_username@remote_ip:remote_folder
或者
scp local_file remote_username@remote_ip:remote_file
或者
scp local_file remote_ip:remote_folder
或者
scp local_file remote_ip:remote_file
②從 遠(yuǎn)程 復(fù)制到 本地文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-695538.html
* 復(fù)制文件:
* 命令格式:
scp local_file remote_username@remote_ip:remote_folder
或者
scp local_file remote_username@remote_ip:remote_file
或者
scp local_file remote_ip:remote_folder
或者
scp local_file remote_ip:remote_file
到了這里,關(guān)于scp命令----跨服務(wù)器傳輸文件的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!