def ssh_command(key_files, username, ip_address):
    """Construct the SSH command for a given IP address and key files."""
    command = ["ssh"]
    for key_file in key_files:
        command.extend(["-i", key_file])
    command.append("{username}@{ip}".format(username=username, ip=ip_address))
    return command