or download this
print "What IP address do you want to allow ssh logins from? ";
$_ = <>;
chomp($_);
...
length($allowed_ipaddr) or die "Sorry, '$_' is not a valid IP addr
+ess.\n";
$allowed_ipaddr = inet_ntoa($allowed_ipaddr); # convert to dotted
+quad, if necessary.
print " You have authorized the host with IP address $allowed_ipad
+dr to log in via ssh.\n";