ssh 相关技巧 ## 不再超时断开 有时因为策略,ssh到一个服务器,长时间没有输入输出,就会断开。 为了避免这样的操作,可以: ``` # vi /etc/ssh/ssh_config ServerAliveInterval 60 ServerAliveCountMax 3 ``` ## 连接复用 有时登录跳板机之类的,不想每次都认证一次,可以连接复用 ``` Host * ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p Host tb HostName xxx.com Port 36000 User myname ForwardAgent yes ``` 来自 大脸猪 写于 2020-01-02 16:12 -- 更新于2021-01-06 14:56 -- 0 条评论