0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

2段階認証のgithubアカウントのssh設定【備忘録】

Last updated at Posted at 2019-10-01

[参考文献]
http://tusukuru.hatenablog.com/entry/2018/08/29/021651
https://ameblo.jp/oregano-blog/entry-11548442168.html

ssh-agentに秘密鍵の登録作業が必要らしい。ssh-addコマンドでできる。引数に秘密鍵を指定する。また、鍵のパスフレーズの入力が必要。

$ ssh-add ~/.ssh/id_git_rsa
Enter passphrase for /home/hogeuser/.ssh/github_id_rsa:
Identity added: /home/hogeuser/.ssh/github_id_rsa (/home/hogeuser/.ssh/github_id_rsa)

接続確認

$ ssh -T git@github.com
Hi xxxxxxxxx! You've successfully authenticated, but GitHub does not provide shell access.

意外と他のサイトでは省略していてPermission denied (publickey).と弾かれがちなので気をつける。

0
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?