LoginSignup
30
32

More than 5 years have passed since last update.

github.comへのSSH通信を爆速化する

Last updated at Posted at 2015-01-30

~/.ssh/configに追記:

Host github.com github.*
  User git
  Port 22
  Hostname github.com
  Compression yes
  ServerAliveInterval 60
  TCPKeepAlive yes
  IdentitiesOnly yes
  ControlMaster auto
  ControlPath /tmp/%r@%n:%p
  ControlPersist yes

github.hogeみたいにして秘密鍵を使い分けていても混ざらずに使えました。


MavericksのHomebrewで入れたopenssh 6.7p1でのみ確認していましたが
CentOS6上ではyumの最新openssh 5.3p1ControlPersistは対応できますがControlPath%n表記に対応していないようでした。

Host github.com
  Identityfile ~/.ssh/id_rsa
  ControlPath /tmp/%r@github.com:%p
Host github.hoge
  IdentityFile ~/.ssh/id_rsa_hoge
  ControlPath /tmp/%r@github.hoge:%p

ControlPath項を個別にハードコーディングして対応。

30
32
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
30
32