ssh config Network segment

Contributed by: akira on 2017年 4月25日(火) 22:46 JST

Last modified on

ここ[*1] を参考にconfigの変更

まあ、172.20.0が同じ場合には、問題になるわけだが。

 

#host gitlab.craine.ne.jp
Match host gitlab.craine.ne.jp exec "ifconfig 2>/dev/null|grep -q 'inet 172.20.0'"
    hostname gitlab.in.craine.ne.jp
    port 22
host gitlab.craine.ne.jp
    hostname gitlab.craine.ne.jp
    port 10220
    user git
    identityfile ~/.ssh/gitlab_rsa
コメント (0件)

Geeklog Site - ssh config Network segment
https://geeklog.craine.ne.jp/article.php?story=20170425224615349

[*1] http://qiita.com/makiuchi-d/items/9f5405179aafa120b3e6