简体   繁体   中英

Running Fabric from an ec2 instance, to another ec2 instance

I'm running Python scripts using Fabric on an ec2 instance. To do so, the scripts and the .pem file are stored and run from my local computer.

Let's say I would like to run these scripts not from my supposedly secure local computer, but from another ec2 instance. In order for this second ec2 instance to run scripts on the first instance, and on behalf of the first instance's user, the .pem file should be stored on this second instance. Otherwise, the Fabric connection would prompt for the first instance user's password.

Is there a way to do so without storing the .pem file on a remote instance, since this wouldn't be a recommended security practice ? (The IAM role ec2 permissions don't seem to help to connect as an ec2 user)

回答自己...在两个带有Fabric的ec2实例之间使用ssh密钥(而不是pem文件)没有问题。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM