简体   繁体   English

如何将文件从AWS服务器传输到AWS服务器位于堡垒服务器之后的本地计算机

[英]How to transfer files from AWS server to local machine where the AWS server is behind Bastion server

How to transfer files from AWS server to local machine 如何将文件从AWS服务器传输到本地计算机

Following is the way all the machines are located 以下是所有机器的定位方式

AWS machine -> Bastion server -> Local machine

I have copied the files from AWS machine to Bastion server and Bastion server to local machine with SCP command 我已使用SCP命令将文件从AWS机器复制到堡垒服务器,并将堡垒服务器复制到本地计算机

Following are the two steps I have done 以下是我完成的两个步骤

  1. ssh into bastion server Copied file from AWS instance to Bastion server ssh进入堡垒服务器从AWS实例复制到堡垒服务器的文件

scp user@ipaddress:~/test1.txt ./

  1. From my local machine, I have executed the following command 在本地计算机上,我执行了以下命令

scp user@bastion:~/test1.txt ./

I would like to automate with a single script which needs to be triggered from my local machine for copying files from AWS instance to local machine 我想使用一个脚本自动执行此脚本,该脚本需要从本地计算机触发才能将文件从AWS实例复制到本地计算机

There is no need to copy files to the Bastion server. 无需将文件复制到堡垒服务器。 In fact, from a security perspective, extremely little should be stored on a Bastion server. 实际上,从安全性的角度来看,堡垒服务器上应该存储的存储量很少。

Instead, there are two methods you can use to directly connect to the "AWS machine" via the Bastion. 而是可以使用两种方法通过堡垒直接连接到“ AWS计算机”。

  • Proxy Jump 代理跳转
  • Port Forwarding 转发端口

See: 看到:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何为本地服务器设置AWS Lambda服务 - How to setup AWS Lambda service for a local server Ksh脚本将文件从服务器传输到本地计算机 - Ksh script to transfer a file from a server to local machine 如何通过ftp从一台Linux计算机(客户端)传输加密文件并在另一台Linux计算机(服务器)上解密 - how to transfer encrypted files from one linux machine(client) over ftp and decrypt on other linux machine(server) 如何使用cron和rsync将文件从远程服务器传输到本地路径 - How to use cron and rsync to transfer files from remote server to local path 将本地计算机上的文件(代码)与远程服务器同步 - Syncing files (code) on a local machine with a remote server 如何在服务器之间传输文件 - How to transfer file from server to server 从远程服务器到本地服务器的Sftp文件 - Sftp files from Remote server to local server 如何将Jenkins作业从Windows本地计算机迁移到Linux服务器? - How to migrate Jenkins job from windows local machine to Linux server? 如何将文件从远程 Linux 服务器传输到工件 - How can I transfer files from a remote Linux server to artifactory 无法从本地计算机连接到Apache服务器 - Cannot connect to apache server from local machine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM