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

SSH Command, gives "Pseudo-terminal will not be allocated because stdin is not a terminal." #104

Open
daniel-b2c2 opened this issue Jan 17, 2023 · 1 comment

Comments

@daniel-b2c2
Copy link

Trying to run an ssh command in zt-exec

new ProcessExecutor()
.command("ssh", "-t", "user@host", "less /var/file")
.redirectInput(System.in)
.redirectOutput(System.out)
.redirectError(System.err)
.execute();

I want the equivalent of running in the terminal ssh -t user@host "less /var/file" which would ssh onto the box, and allow me to interact with less for the given file, when I press q, that exits less, the ssh session should end.

Instead what happens is I get Pseudo-terminal will not be allocated because stdin is not a terminal. and then less just scrolls and doesn't accept input. Is there a workaround for this?

The expectation would be it acts like on the command line, launching less and then continuing once q has been pressed.

@nemecec
Copy link
Collaborator

nemecec commented Feb 22, 2023

This issue is most likely not related to zt-exec. You can check https://stackoverflow.com/questions/7114990/pseudo-terminal-will-not-be-allocated-because-stdin-is-not-a-terminal -- maybe that solves your issue?

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

2 participants