How can I use ssh port forwarding to copy file across servers separated by firewall?
Issue
- 2 servers,$SRC_SERVER and $DST_SERVER are each on networks separated by a firewall so directly ssh from one to the other is not possible. Also SSH daemons are configured to block logging in as root. Only inbound ssh connections are allowed on these server.How can I transfer a root-owned, only-root-can-read file, keeping file ownership, permissions & the modification date from $SRC_SERVER to $DST_SERVER?
Environment
- RHEL (Any Version)
- OpenSSH
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.