#!/bin/bash sed -i '$a\ALL:ALL:deny' /etc/hosts.deny for ip in $ip_h;do sed -i '$a\sshd:$ssh_port:allow' /etc/hosts.allow done