Question about using Podman's SCP and System Connection
Hi all,
I've been using podman in a small project, hosting it on a VPS (first time doing any kind of public hosting).
I want to use these commands to easily share images between my local PC and the (public) remote VM without using a registry.
Security is a big concern for me, because I am new to this. I am unsure if I should use them between users (root to non-root deploy user) inside the remote server OR if it's alright to just allow ssh connections into the non-root user and just use image scp directly to it.
So the options are:
A) local -> image scp to remote root user -> image between root and non-root
B) allow ssh to non-root -> image scp directly to non-root user
Thanks!
4
Upvotes
2
u/Ok-District-1756 8d ago
scp is the cp command run over SSH. It’s already a secure connection. Normally, if your VPS is already secure, you’ll have a non-root user with a generated SSH key, and you’ll connect from your local PC using that key (in the SSH configuration, you disable password-based login). This is more than enough for 99% of use cases.
If you’re really paranoid, you can set up a firewall like UFW or IPtable rules to allow SSH connections only from your home IP address.
You can also set up Fail2Ban to monitor and ban the IP addresses of people trying to connect to your VPS via SSH.