“输入身份验证器的PIN"与SSH相关的问题 [英] 'Enter PIN for authenticator' Issue related to SSH

查看:342
本文介绍了“输入身份验证器的PIN"与SSH相关的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在 Macbook Pro 上为我的Github生成SSH密钥.但是,当我进行将其添加到ssh-agent的步骤时,却遇到了输入PIN以供身份验证者使用"的问题.奇怪的问题来自以下命令:

I attempted to generate a SSH key for my Github on a Macbook Pro. Yet I encountered the 'Enter PIN for authenticator' issue when I progressed to the step of adding it to the ssh-agent. The bizarre asking is from the following command:

$ ssh-add -K ~/.ssh/id_rsa
Enter PIN for authenticator:

我完全不知道要问什么.但是,当我用以下命令键入内容时,一切都像

which I totally have no idea what I should type into for this asking. Yet as I typed with the following command, everything just worked as this page revealed.

$ /usr/bin/ssh-add -K ~/.ssh/id_rsa
Identity added: /Users/${user_name}/.ssh/id_rsa (your_email@example.com)

为什么存在这种差异?要求输入为验证者输入PIN:"的确切内容是什么?

Why there exists this kind of difference ? What exactly you need to type for the asking of 'Enter PIN for authenticator:' ?

  1. 版本信息

$ ssh -V
OpenSSH_8.3p1, OpenSSL 1.1.1g  21 Apr 2020

$ sw_vers -productVersion
10.15.6

  1. 我使用ed25519算法生成了密钥.

推荐答案

您的shell的$ PATH中有第二个ssh-add(已通过Brew-installed吗?),它与Apple版本不同.在Apple版本中,-K将密码存储在钥匙串中,因此您不必每次都键入密码.在非Apple版本中,-K从FIDO身份验证器加载常驻密钥."

You have a second (Brew-installed?) ssh-add in your shell's $PATH which is not the same as the Apple version. In the Apple version -K stores the password in your keychain, so you don't have to type it every time. In the non-Apple version -K "Loads resident keys from a FIDO authenticator."

ssh-add位于

/usr/bin/ssh-add

是苹果提供的,并且可以与-K一起使用.

is the Apple provided one, and will work with -K.

这篇关于“输入身份验证器的PIN"与SSH相关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆