def cut_remote_user_dir(remote_path):
    """
    sftp does not understand '~', so we cut it away since sftp interprets relative paths relative to the sftp working
    directory, which is initialized as home directory.

    :param remote_path: The path from which to cut the user directory
    :type remote_path: str
    :return: The given path without ~ at the beginning
    :rtype: str
    """
    if remote_path.startswith('~/'):
        return remote_path[2:]
    return remote_path
