问题
在使用scp
命令从本地上传文件到服务器时出现以下报错:
ssh: Could not resolve hostname e: Temporary failure in name resolution
ssh:无法解析主机名e:名称解析暂时失败

解决
- 退出与服务器的连接
exit

- 在本地命令行使用
scp
命令
scp [源路径] username@主机名:[目标路径]
scp /本地路径/文件名.txt user@example.com:/远程路径/
注意:当使用config配置ssh时(或通过跳板机),user@example.com:
要变成hostname:
