脚本实现功能:批量或单个SSH免交互登录认证
脚本应用场景:当部署集群时,大多数实现要配置好管理节点与从节点的SSH免交互登录,针对这样的情况,写了下面脚本,简化工作。
脚本支持系统:Ubuntu和CentOS
#!/bin/bash # Description: configuration local host and remote host ssh keypair authentication, Support Ubuntu and CentOS operation system. # Blog: http://lizhenliang.blog.51cto.com function color_echo() { if [ $1 == "green" ]; then echo -e "