Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continue demo in a newly created bash session #24

Closed
yuvalavra opened this issue Feb 23, 2022 · 2 comments
Closed

Continue demo in a newly created bash session #24

yuvalavra opened this issue Feb 23, 2022 · 2 comments

Comments

@yuvalavra
Copy link

Is there a way to continue the demo on a newly created bash session? Something like:

pei "ssh 10.0.0.1"
# Subsequent commands run in the ssh session
pei "hostname" 

Thanks

@yuvalavra yuvalavra changed the title New bash sessions Continue demo in a newly created bash session Feb 23, 2022
@mtardy
Copy link

mtardy commented Oct 10, 2022

I'm extra late to the party but if you ever still wonder, personally for a demo on k8s (I think you have similar situations 😄) I just copy demo magic, pv, and my demo magic script to the target, and execute, it's pretty transparent.

Typically something like this:

# dependencies
kubectl cp demo-magic $CHALL_POD_NAME:/tmp 
kubectl exec -it pod/$CHALL_POD_NAME -- mkdir -p /home/user/.bin
kubectl cp pv $CHALL_POD_NAME:/home/user/.bin/pv
# demo magic script
kubectl cp honk-pod.sh $CHALL_POD_NAME:/home/user/honk-pod.sh
# jump
kubectl exec -it pod/$CHALL_POD_NAME -- /home/user/honk-pod.sh -d

Just make sure that PV is in the path (in my case PATH=/home/user/.bin/:$PATH) before loading demo-magic.sh.

My example is a bit specific but you can simply and use scp and ssh instead of kubectl cp or kubectl exec.

@paxtonhare
Copy link
Owner

thanks @mtardy for the answer.

@yuvalavra I just added an example for a non-kubernetes setup that would do what you want. It's under the samples/remote-exec directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants