Set up a network-based solution for transferring files between two virtual machines.
Set up a network-based solution for transferring files between two virtual machines.
You've encountered some connection issues with your SFTP setup and VPN configuration. Let's break this down. For the SFTP, you're getting an error when using a newly generated certificate, but it works fine with the default one. For the VPN, you mentioned port forwarding a local VPS to your LAN, yet you can't reach your local network from outside. Have you tried verifying the firewall rules on both the modem/router and the VPN gateway? Also, double-check that the private IPs and ports are correctly mapped.
The protocols differ, and it seems you're using FTPS here. SFTP isn't related to FTP—it's actually part of OpenSSH. Your goal is to move files between virtual machines. If this were a simple task, I'd likely use rsync instead. FTP isn't the only option, but it's not widely used these days. This protocol has a long history since its creation in 1971 before the internet was widespread. For more details, check the man pages for rsync and learn from them. (You can ask for tutoring if you'd like.)
It was only exchanging files locally using FTP or with TLS activated. I need to move past the LAN network.
Beyond the LAN network... it seems you're mixing things up. It looks like you're trying to express whether you need an FTP service accessible over a public wide area network. Think of these services like sockets that allow connections to be established.
There are multiple methods available. Different approaches exist for various reasons. A NAT can redirect the port number from your private network to a specific address and port on your local network. For instance: client ---> 4.4.4.4:22 (your wan IP) --> routed through NAT --> 192.168.1.4:22 (your server on LAN). A VPN connects the whole network by establishing a protected path. Example: client ---> VPN Server ----> any device on your local network or back and forth. Additional techniques also exist.
Essentially, what you need to do is set up two Ubuntu installations, enable SSH, and install rsync. Then run rsync with the appropriate flags to mirror files securely over SSH. The man page explains each option clearly, so you can understand their purposes. For more details, check the freeBSD documentation on rsync. Using rsync without -av -e will produce a different result compared to using it with those options.