human
Solve the following python programming problem given the following code:
@contextlib.contextmanager
def vios_to_vios_auth(source, dest, conn_info):
assistant
#Here is the Python program you requested.

    """Context allowing for SSH between VIOS partitions
    This context will build an SSH key on the source host, put the key
    into the authorized_keys on the destination host, and make the
    private key file name available within the context.
    The key files and key inserted into authorized_keys will be
    removed when the context exits.
    :param source: source IP or DNS name
    :param dest: destination IP or DNS name
    :param conn_info: dictionary object with SSH connection
    information for both hosts
    """
    KEY_BASE_NAME = ('os-%s' % uuid.uuid4().hex)
    keypair_uuid = uuid.uuid4()
    src_conn_obj = ssh_connect(conn_info)
    dest_conn_info = Connection(dest, conn_info.username, conn_info.password)
    dest_conn_obj = ssh_connect(dest_conn_info)
    def run_command(conn_obj, cmd):
        (stdout, stderr) = utils.ssh_execute(conn_obj, cmd)
        return stdout.strip().splitlines()
    def build_keypair_on_source():
        mkkey = ('ssh-keygen    -f    %s    -N    ""    -C    %s' % (KEY_BASE_NAME, keypair_uuid.hex))
        ssh_command_as_root(src_conn_obj, mkkey)
        chown_key = ('chown    %s    %s*' % (conn_info.username, KEY_BASE_NAME))
        ssh_command_as_root(src_conn_obj, chown_key)
        cat_key = ('cat    %s.pub' % KEY_BASE_NAME)
        pubkey = run_command(src_conn_obj, cat_key)
        return pubkey[0]
    def cleanup_key_on_source():
        rmkey = ('rm    %s*' % KEY_BASE_NAME)
        run_command(src_conn_obj, rmkey)
    def insert_into_authorized_keys(public_key):
        echo_key = ('echo    "%s"    >>    .ssh/authorized_keys' % public_key)
        ssh_command_as_root(dest_conn_obj, echo_key)
    def remove_from_authorized_keys():
        rmkey = ('sed    /%s/d    .ssh/authorized_keys    >    .ssh/authorized_keys' % keypair_uuid.hex)
        ssh_command_as_root(dest_conn_obj, rmkey)
    public_key = build_keypair_on_source()
    insert_into_authorized_keys(public_key)
    try:
        (yield KEY_BASE_NAME)
    finally:
        remove_from_authorized_keys()
        cleanup_key_on_source()