对许多ssh登录都有疑问

时间:2017-10-26 09:38:15

标签: ssh ansible

我们一直在使用ansible进行部署。当我登录到服务器类型last命令时,它显示太多登录了解为什么有这么多登录?

deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)    
deployer pts/0        ip-10-0-0-xxx.ap Tue Oct  3 08:54 - 08:54  (00:00)

1 个答案:

答案 0 :(得分:2)

根据您的配置,Ansible可以为剧本中的每个任务创建最多5个不同的SSH连接。

确保已启用控制套接字和流水线模式以减少连接数并提高速度。 有关详细信息,请参阅this article OpenSSH连接提示部分)。