Skip to content

SSH on panes and run commands in the new shell #138

@bruno-rescale

Description

@bruno-rescale

Hi, I have the below itermocil template and it works partially. When I execute it, it opens 3 panes in the right layout and it runs an ssh command (from a variable) and logs in successfully. However the second and third panes do not run ps faux and top even after sleeping a few seconds. I noticed that once I exit those ssh sessions, the ps and top commands will run but I want them to run in the ssh'ed session. Is there a way to do this?

 windows:
   - name: quichssh
     root: ~
     layout: main-vertical
     panes:
       - commands:
         - ${ssh}
       - commands:
         - ${ssh}
         - sleep 2 && ps faux
       - commands:
         - ${ssh}
         - sleep 2 && top

I saw a prevoius post about adding -t flag to the ssh command but lets' assume i can't change ${ssh} as it's coming from another automated variable. As a last resource, I can try to parse and change ${ssh} and append -t as an additional argument if there is nothing else to do. But my priority is to see if there is an easier way. Thanks in advanced!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions