If both options throw the same nondescript error I would suspect that there is a firewall at play.
You have already confirmed that there is no firewall blocking access on the NAS side since you can connect from a different computer over the Internet. If this is not the case and you only tried connecting from a computer on the same network as the NAS please try connecting to your NAS over the Internet. Simple solution for this test: tether your laptop to your phone's 3G / 4G data connection and try accessing your NAS.
While you're at this, let's also confirm that your NAS does implement an SFTP protocol that PHP (through either the SSH2 or the cURL library) can access. On the same Internet-connected laptop set up a local server (e.g. XAMPP, WAMPServer, MAMP, ...), install Joomla and Akeeba Backup and set up the transfer over SSH. Please note that you may only see the cURL option; the SSH2 module for PHP only became stable as of PHP 7.1 and not all local host packages include it even to this date.
If there is no issue on the NAS side, we might have a firewall on the server side, blocking outbound connections. If I recall correctly that's the default configuration of 1&1. Please ask your host to let you access your NAS over SSH. You will need to provide them the port you're using on your NAS and its (static) IP address.
Nicholas K. Dionysopoulos
Lead Developer and Director
🇬🇷Greek: native 🇬🇧English: excellent 🇫🇷French: basic • 🕐 My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!