This was finally resolved by installing an older version of vscode that supports such remote connection And disabling auto updates