LoginSignup
0
1

More than 5 years have passed since last update.

ローカルのEd25519鍵をGitKrakenで使う

Last updated at Posted at 2018-02-25

最強とか言うフレーズに弱いので、すぐに使ってしまう。
SSH認証に最強の「Ed25519鍵」を使おう

Ed25519とは?

楕円曲線暗号の一種
RSAに比べて短い鍵で同等の強度を持つことができる。

High security level.
This system has a 2^128 security target; breaking it has similar difficulty to breaking NIST P-256, RSA with ~3000-bit keys, strong 128-bit block ciphers, etc.
The best attacks known actually cost more than 2^140 bit operations on average, and degrade quadratically in success probability as the number of bit operations drops.
Ed25519: high-speed high-security signatures

Ed25519鍵の生成

  • 環境
    • Mac Sierra v10.12.6
    • OpenSSH v7.4
    • GitKraken v3.3.4
$ ssh-keygen -t ed25519

ファイル名はデフォルトだと

  • 秘密鍵id_ed25519
  • 公開鍵id_ed25519.pub

このままだとEd25519鍵使ってくれないのでssh-agentに登録する。

ここで登録するのは秘密鍵

$ ssh-add ~/.ssh/id_ed25519

このままでは、GitHubとの接続に今まで使っていたRSA2048とか使ってしまうので、

~/.ssh/config
Host github.com
    HostName github.com
    IdentityFile ~/.ssh/id_ed25519
    User git

と書いて、Ed25519鍵使うように設定しておく。

公開鍵の方は、GitHubとかGitLabとかSSH接続先に置く。

GitKrakenの設定

  • preferences
    • Authentication
      • General
        • Use local SSH agent ←これにチェック

スクリーンショット 2018-02-25 23.47.45.png

これだけでおk

これでGitHubやGitLabでもローカルのEd25519鍵使ってくれる。1

:exclamation:注意:exclamation:
GitKraken -> Authentication内のGitHubのAdd existng SSH keyに公開鍵/秘密鍵を設定してはならない


  1. 接続先に公開鍵置いたり、ssh/configに設定追加しておく必要はある。 

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1