admin管理员组

文章数量:1618723

问题

在使用scp命令从本地上传文件到服务器时出现以下报错:

ssh: Could not resolve hostname e: Temporary failure in name resolution
ssh:无法解析主机名e:名称解析暂时失败

解决

  1. 退出与服务器的连接
exit

  1. 在本地命令行使用scp命令
scp [源路径] username@主机名:[目标路径]

# 例如
scp /本地路径/文件名.txt user@example:/远程路径/

注意:当使用config配置ssh时(或通过跳板机),user@example:要变成hostname:

本文标签: 报错上传文件命令服务器scp