Can I test authentication with an RSA key locally?

前端 未结 2 743
心在旅途
心在旅途 2021-01-31 08:35

Is there a way to check locally if you\'re providing the correct passphrase to an RSA key?

I recently had trouble pushing some commits to github because the push prompte

相关标签:
2条回答
  • 2021-01-31 09:06

    Or as pointed here: How can I test my ssh-keys locally without a server

    You can do this:

    ssh-keygen -y
    

    And this doesn't require any server (works great with msysgit on Windows).

    0 讨论(0)
  • 2021-01-31 09:19

    You can run ssh-add to add your key to your current ssh-agent. This will prompt for your passphrase.

    Normally, when ssh-agent is running, and you add a key to it, you won't have to unlock your key any more when you connect to hosts that recognise that key. If that isn't what you want, just run ssh-add -d to remove it off your ssh-agent when you're done testing.

    0 讨论(0)
提交回复
热议问题