内部の大量のサーバにforとかansibleとかでsshしまくる時のチューニング
環境
- CentOS6
- OpenSSH 6.6
| オプション | |
|---|---|
| -c arcfour256 | ファイル転送などで倍くらい早くなる |
| ControlMaster=auto ControlPersist=24h ControlPath ~/.ssh/mux-%r@%h:%p |
コネクション使いまわす? 2回め以降は10倍以上早くなる |
| UserKnownHostsFile=/dev/null StrictHostKeyChecking=no |
内部通信なのでフィッシングとかには合わないので無効 |
| LogLevel=ERROR | 好みに合わせて |
bashrc
alias ssh='ssh -c arcfour256 -o ControlMaster=auto -o ControlPersist=24h -o "ControlPath ~/.ssh/mux-%r@%h:%p" -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o LogLevel=ERROR -o ForwardAgent=yes'