Ran into issue of my privateKey having an incorrect path but errors only showed Authentication Error. Looks like the existsSync did not have proper error handling whereas statSync does.
However might throw error if default key locations do not exist (/.ssh/xxx)
Ran into issue of my privateKey having an incorrect path but errors only showed Authentication Error. Looks like the existsSync did not have proper error handling whereas statSync does.
However might throw error if default key locations do not exist (/.ssh/xxx)
API Reference: https://nodejs.org/api/fs.html#fs_fs_existssync_path