zoukankan      html  css  js  c++  java
  • Show SSH key file in Git Bash

    Show SSH key file in Git Bash

    回答1

    Which SSH key is used isn't determined by Git, but by the SSH client itself. Either the appropriate key is configured in ~/.ssh/config, or ssh just tries all keys it can find when connecting to the host. You can see which key ultimately succeeded by connecting to the host with the standard SSH client. For example, when using GitHub:

    ssh -v git@github.com
    

    This will give you something a bit like this:

    [...]
    debug1: Offering RSA public key: /home/me/.ssh/id_rsa
    debug1: Authentications that can continue: publickey
    debug1: Offering RSA public key: /home/me/.ssh/id_rsa2
    debug1: Server accepts key: pkalg ssh-rsa blen ****
    [...]
    

    This tells you that the key .../id_rsa2 was the one accepted by the server.

    回答2

    Another solution, in the latest Git Bash, you can type:

    $ git-gui
    

    Then a GUI application is executing, and in the GUI, you can just click HelpShow SSH Key to show your SSH key.

  • 相关阅读:
    数组操作
    HTML CSS 笔记
    jacascript 滚动scroll
    SEO优化技巧
    STP选举规则和例题
    3.1GSM-R的网络组成
    光缆的型号
    光缆的种类
    fdisk命令分区过程
    文件系统管理--挂载光盘与U盘
  • 原文地址:https://www.cnblogs.com/chucklu/p/15438263.html
Copyright © 2011-2022 走看看