SSHの設定
MabBookで設定しているSSHのconfigを、なんとなくメモしておく。
$ cat $HOME/.ssh/config ServerAliveInterval 60 Host hoge HostName hoge.local.example.com Host foo HostName foo.local.example.com Host zoo HostName zoo.local.example.com PubkeyAuthentication no Host web-org HostName web.local.example.org User carol IdentityFile ~/.ssh/id_rsa.example.org Host mail-org HostName mail.local.example.org User carol IdentityFile ~/.ssh/id_rsa.example.org Host web-net blog mt HostName web.example.net Host db-net db-blog db-mt HostName web.example.net ProxyCommand ssh db nc %h %p Host * User alice ForwardAgent yes ForwardX11 no
最後に全般の設定をしている理由は、設定は上書きされないから。
各設定項目で最初に見つかった値が使われるので、ホストに特化した宣言をファイルの先頭近くに置くようにし、一般的なものを後に置くのがよいでしょう。
から
http://www.unixuser.org/~euske/doc/openssh/jman/ssh_config.html