在添加ssh免密登录时,报ssh公钥不存在:

经过仔细排查,发现在生成ssh**的时候输错了指令:

/usr/bin/ssh-copy-id: ERROR: failed to open ID file '.pub': No such file or directory

此处应该直接回车,而不是输入yes,这会导致ssh公钥另存为当前目录的yes.pub文件当中,所以在执行ssh-copy-id命令时,如果不显示指定公钥文件,将会报错,/usr/bin/ssh-copy-id: ERROR: failed to open ID file ‘.pub’: No such file or directory:

/usr/bin/ssh-copy-id: ERROR: failed to open ID file '.pub': No such file or directory

所以我们不需要将ssh公钥另存,直接按默认路径存储即可:

/usr/bin/ssh-copy-id: ERROR: failed to open ID file '.pub': No such file or directory

相关文章:

  • 2022-12-23
  • 2021-09-16
  • 2021-09-22
  • 2021-10-15
  • 2021-04-26
  • 2021-05-11
  • 2021-11-15
猜你喜欢
  • 2021-08-13
  • 2022-12-23
  • 2022-12-23
  • 2022-02-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案