def get_file_contents(ssh, file):
    """
    Retrieve the contents of file from the remote server.
    """
    _, stdout, stderr = ssh.exec_command('cat {}'.format(file))
    err = stderr.read()
    if len(err) > 0:
        return False, err
    return stdout.read().decode('utf-8').strip()
