我正在尝试设置无密码 SSH 登录,但似乎无法使其工作。这是我到目前为止所做的:
ssh-keygen -t rsa
生成一对密钥~/.ssh/authorized_keys
并将公钥转储到该文件中chmod 700 ~
chmod 700 ~/.ssh
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 访问权限。知道这里出了什么问题或者我可以尝试什么来让它工作吗?