Deploy solution for multiple SSH users
Closed this issue · 4 comments
Initial message: https://discord.com/channels/754739461707006013/798951453556211753/1133150801133584585
We could do a second EC2 specifically for bots and create an account for each user.
Proposed eth_bots pseudo-readme (located in elf-simulations/examples/eth_bots/README.md
:
-
ssh into your cloud account (or ec2 instance)
- make sure to add a flag to forward your github ssh key
-
make a fork of the elf delvtech elf-simulations repo (instructions). You can also create a branch off of the delvtech repo if you'd prefer.
-
clone your fork via
git clone https://github.com/[YOUR_USERNAME]/elf-simulations.git elf-simulations
-
follow the installation instructions linked from
elf-simulations/INSTALL.md
-
run the elfpy tests to verify that everything installed correctly by executing
pytest
in theelf-simulations
folder. Make sure you have enabled the correct environment! -
modify the
elf-simulations/examples/eth_bots/config.py
file as you need -
run the bot script via
python examples/eth_bots/main.py
Created a new EC2 instance. Adding users /home and .ssh configurations currently. Each user will have to generate a .pub key and provide it to me to add to the ec2.
SSH to EC2 Instruction. (In-Progress)
- Generate a public/private key pair (Mac/Linux)
- ssh-keygen -t ed25519 -a 100 -f ~/.ssh/botskey
- Retrieve the public key. Will need to be provided to Jacob directly.
- cat ~/.ssh/botskey.pub
- Once your public key is added to the ec2 instance. You should be able to connect from local via ssh
- ssh -i "~/.ssh/botskey" {yourusername}@ec2-18-117-32-126.us-east-2.compute.amazonaws.com
Additional Notes
- Your username will be the left side of your email address. ie Email: dannyd@delv.tech = Username: dannyd
- The format of the public key you provide should look something like this:
ssh-ed25519 AAAAC3NzaC1lZDIASDFASEFAWE123423423asdfasdaw+ localuser@localmachine.local