5
我在我的應用程序中使用ssh,並且必須將「-t -t」傳遞給ssh才能正常工作。否則,我的應用程序的stdin會受到ssh調用的干擾。強制僞終端的ssh通過-t -t避免了這個問題,而是導致從SSH回來以下令人費解的錯誤消息,儘管該應用程序似乎正常工作,否則:在ssh中使用僞tty導致警告
tcgetattr: Inappropriate ioctl for device
我想擺脫這個信息,以防止它發生,而不是僅僅抑制它,但我不知道爲什麼它會來,我應該做什麼來阻止它。當-t -t傳遞給ssh時,我只會收到消息。
注意類似的問題在這裏問:
http://www.perlmonks.org/?node_id=664789
的手冊頁SSH說:
-t Force pseudo-tty allocation. This can be used to execute arbitrary
screen-based programs on a remote machine, which can be very useful,
e.g., when implementing menu services. Multiple -t options force tty
allocation, even if ssh has no local tty.
你有沒有想過?我想了解這一點,因爲在我的情況下(略有不同),我不能使用'-n'。我問在https://serverfault.com/questions/851186/所以,如果適當,隨時回答,而不是在這裏。 – Davide 2017-05-19 18:01:35
@Davide我在服務器故障upvoted你。就在不久前,我不記得迴避-t -t警告,但我可能會誤解。如果您在那裏得到了很好的回覆,請在此更新您的評論。 – WilliamKF 2017-05-20 02:31:12
是的,這裏有一個很好的迴應,看看! – Davide 2017-05-22 21:34:32