Tobi
Tobi

Reputation: 2828

AWS Elastic Beanstalk CLI "eb ssh" send command to instance when opening it via itermocil

eb ssh -n 1

would connect to the currently selected env and instance 1 in the list of instances.

is it somehow possible to execute a command once the shell is open? I'm using itermocil and would like to automatically execute a tail -

Right now my config looks like this:

windows:
  - name: general
    root: ~/Documents/LocalProjects/project
    layout: tiled
    panes:
      - commands:
         - cd web
         - eb ssh -n 1
      - commands:
         - cd worker
         - eb ssh -n 1

Upvotes: 2

Views: 1470

Answers (1)

Lewy
Lewy

Reputation: 719

It seems it's possible with newer version of eb cli

➜  eb --version
EB CLI 3.10.2 (Python 2.7.1)

➜  eb ssh --command "pwd"
INFO: Running ssh -i /Users/xxx/.ssh/xxx [email protected] pwd
/home/ec2-user

http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb3-ssh.html

Upvotes: 2

Related Questions