大网数据广告活动
服务器运维问答

Using pseudo tty with ssh and control master results in warning

· 52CE 我爱测

I am setting up the following for some of my users. Machine A, running OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips Machine B, running OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f Both servers are Linux, and I administer the latter.…

问题原文

原帖链接 · Davide · CC BY-SA 3.0

I am setting up the following for some of my users.

  • Machine A, running OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips
  • Machine B, running OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8, OpenSSL 1.0.1f
  • Both servers are Linux, and I administer the latter.

Users have accounts on both machines and they manually ssh from B to A, e.g. by typing ssh A and do work on A. Their ~/.ssh/config looks like:

Host *
ControlMaster auto
ControlPath /tmp/ssh_mux_%h_%p_%

While running other stuff on B, they also (indirectly) run commands like ssh -tt A xxx (where xxx is some complicated stuff) because while doing whatever they are doing on B, it needs to find some things that needs to be found that way. Thanks to control master they are not bothered all the time with password requests (machine A is not under my control and does not accept key-based logins). Note that xxx invoke some code that would not work if I would not use -tt. You may claim that such a code is broken and I might agree, but forcing the tty makes it happy.

Everything works just fine, however the manual connection they opened from B to A becomes littered (and practically not usable) by messages:

process_mux_new_session: tcgetattr: Inappropriate ioctl for device

This seemed related to https://stackoverflow.com/questions/1495776/ and https://bugzilla.mindrot.org/show_bug.cgi?id=1686

Is there any way to silence these messages to make the first connection useful without them needing to open another one?

已采纳解答

原帖链接 · Davide · CC BY-SA 3.0

Elevating @MarkWagner comment to status of answer.

Based on the patch in the bug you need to add -q to the one of ssh invocations (I'm not sure which.) – May 19 at 19:42

Based on some quick tests, it seems that the manual connection opened from B to A is the one that needs the -q

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-05-19)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。