SCP 一次传输多个文件.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2020-11-24 14:13:21 +08:00
parent b68beb0c40
commit be8aecad2d
1 changed files with 9 additions and 0 deletions

View File

@ -161,6 +161,15 @@ SCP 下载
scp <User Name>@<IP>:<Path or File> <Local Path or File>
```
SCP 一次传输多个文件
```bash
scp <User Name>@<IP>:<Path>/\{file1,file2\} .
# 还可以使用正则表达式,如:
scp <User Name>@<IP>:<Path>/* .
scp <User Name>@<IP>:<Path>/*.txt .
```
## 免密访问
ssh 登陆或 scp 的时候每次都输入密码很麻烦,如果用于访问 SSH 服务器的客户端值得信任的话可以授权该主机用户免密登陆。做法是先在客户端生成密钥对,如果已有密钥对可跳过本步骤: