小编Dom*_*c P的帖子

如何调试公钥 SSH 身份验证失败

我正在尝试设置无密码 SSH 登录,但似乎无法使其工作。这是我到目前为止所做的:

  1. 用于ssh-keygen -t rsa生成一对密钥
  2. 在服务器上创建~/.ssh/authorized_keys并将公钥转储到该文件中
  3. chmod 700 ~
  4. chmod 700 ~/.ssh
  5. chmod 600 ~/.ssh/authorized_keys

当我尝试使用私钥登录时,我得到以下输出ssh -vvv

debug1: Next authentication method: publickey
debug1: Trying private key: /path/to/private-key
debug1: read PEM private key done: type RSA
debug3: sign_and_send_pubkey: RSA [KEY_FINGERPRINT_HERE]
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue: password,publickey
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
Run Code Online (Sandbox Code Playgroud)

我很确定服务器正在运行 FreeBSD,但它不是我的,而且我没有 root 访问权限。知道这里出了什么问题或者我可以尝试什么来让它工作吗?

ssh public-key

5
推荐指数
1
解决办法
4万
查看次数

标签 统计

public-key ×1

ssh ×1