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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
