开发者

Can I make SSH Authentication Lightning Fast?

I use SSH in a terminal window many times during a day.

I remember reading about a way to reuse a single connection so that the TCP and SSH handshaking don't have to 开发者_如何学JAVAhappen every time I establish another request to the same host.

Can someone point me to a link or describe how to establish a shared ssh connection so that subsequent connections to the same host will connect quickly?

Thanks.


Answering my own question. Improving SSH (OpenSSH) connection speed with shared connections describes using the "ControlPath" configuration setting.

UPDATE: For connections that are opened and closed often add a setting like ControlPersist 4h to your ~/.ssh/config. See this post about SSH productivity tips.


If you want to keep the terminal opened, the easiest way is producing I/O ("tail -f" or "while [ -d . ]; cat /etc/loadavg; sleep 3; done").

If you want to improve the connection handshake one way I use is adding "UseDNS no" on your sshd_config.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜