I was working with linux and the only solution AWS offered me was to add the IP to the whitelist. The real problem was Linux is disabled by default. To enable it:

  • Go to AWS console
  • Workspaces / Directories
  • Select the used directory (tick)
  • Click on Actions and select update details
  • Access Control Options
  • Check Linux in OTHER PLATFORMS
  • Click update and try to connect again