sed -i -r '/^[ ]*#/d;/^$/d' /etc/haproxy/haproxy.cfg #修改配置文件去掉注释,或者你可以直接复制我的代码 sed -i -r '/^[ ]*#/d;/^$/d'#Port 22