Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
25
Help us understand the problem. What is going on with this article?
@pinkumohikan

初回SSH接続時の対話的Fingerprint確認フローをssh-keyscanでスキップする

More than 1 year has passed since last update.

この記事で分かること

  • 初めてSSH接続するホストでも、fingerprint確認フローをスキップする方法

↓ こんな奴

$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)?

やり方

$ ssh-keyscan github.com >> ~/.ssh/known_hosts

以上。

上記コマンドを実行すると、
初回SSH接続時にでる Are you sure you want to continue connecting (yes/no)? という問いに対して yes と答えたのと同じように、指定したホストの公開鍵を取得して ~/.ssh/known_hosts ファイルへ追記してくれる。

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

便利ですね :beers:

25
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
pinkumohikan
プログラマー風林火山で言う「風のエンジニア」になりたい(比較的)若者Webエンジニア。

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
25
Help us understand the problem. What is going on with this article?