LVS– setup ssh load balance

/etc/ha/lvs.cf

serial_no = 70
primary = 202.127.204.14
primary_private = 11.11.11.111
service = lvs
backup = 0.0.0.0
heartbeat = 0
heartbeat_port = 539
keepalive = 6
deadtime = 18
network = nat
nat_router = 11.11.11.112 eth1:1
nat_nmask = 255.255.255.0
debug_level = NONE
virtual ssh {
 active = 1
 address = 202.127.204.19 eth0:1
 vip_nmask = 255.255.254.0
 port = 2022
 use_regex = 0
 load_monitor = none
 scheduler = rr
 protocol = tcp
 timeout = 6
 reentry = 15
 quiesce_server = 0
 server shenma101 {
 address = 11.11.11.101
 active = 1
 port = 22
 weight = 1
 }
 server shenma102 {
 address = 11.11.11.102
 active = 1
 weight = 1
 }
}

同步所有real server(11.11.11.101~105)上的/etc/ssh/ssh_host_*