-
-
Notifications
You must be signed in to change notification settings - Fork 232
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
execute only first entered in therminal #192
Comments
This is completely dependent on what If you are trying to actually type the password from the tty, I would recommend to consider using a ssh key instead. Not sure how the ssh password inputs works, but trying your code with a ssh key works as expected. That would fall more under the golang.org/x/term library or similar as it is not a pty issue. |
@mykolq - I believe ssh reads the pw from the process's "controlling tty", not from stdin and not necessarily the current tty. I don't know if this library sets the "controlling tty" setting by default, or if it even can. (If it does or can I'd love to hear about it, for my own app.) I think there are arguments you can give to ps to show a process's controlling tty, and strace could be useful to see exactly what file handle a process is reading from. I know that's handwavy and vague but I hope it points you in the right direction. |
@theclapp I have decided to use python for this task. Thanks for answer |
i start this code and it seems that code only entered password, but no startig test and exit commands. am i use it wrong?
The text was updated successfully, but these errors were encountered: