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

[Question] Interactive SSH #559

Closed
pkulev opened this issue Sep 24, 2021 · 1 comment
Closed

[Question] Interactive SSH #559

pkulev opened this issue Sep 24, 2021 · 1 comment

Comments

@pkulev
Copy link

pkulev commented Sep 24, 2021

Guys, cool package, can't enjoy enough!

Is there a way to do interactive SSH prompt like just ssh user@host, to let user type commands on remote host?

I want something like this:

./app.py stand shell --name dev3
Last login: Fri Sep 24 14:23:18 2021 from X.X.X.X
[centos@dev3 ~]$
@pkulev
Copy link
Author

pkulev commented Apr 23, 2022

I eventually found out (#565 (comment)) about passing stdin, stdout and stderr and replaced subprocess.call(..., shell=True) with

ssh = plumbum.local["ssh"]["-tt", f"{stand.user}@{stand.hostname}"]
ssh("sudo su -",
    stdin=sys.stdin,
    stdout=sys.stdout,
    stderr=sys.stderr,
    retcode=None)

So leaving this for history.

@pkulev pkulev closed this as completed Apr 23, 2022
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

1 participant