bash - cygwin ssh 在退出时给出 "Killed by signal 1"

标签 bash ssh cygwin signals

在使用 cygwin 的 ssh 从 windows 登录到 linux-hosts 之后, 退出远程 shell 时,我总是收到烦人的消息:

“被信号 1 杀死”

我用谷歌搜索了一下,发现它无害,但仍然很烦人...... 有些人建议您可以使用

$ ssh -q ...

但这对我试过的任何机器都没有影响。

有人知道摆脱此消息的有效解决方案吗?

最佳答案

当您通过另一台主机代理您的 ssh session 时会发生这种情况。 .ssh/config 文件示例:

# machine with open SSH port
Host proxy
HostName foo.com

# machine accessible only from the above machine
Host target
HostName 192.168.0.12
ProxyCommand ssh proxy nc %h %p

当您退出 ssh 目标 时,ProxyCommand 中的 ssh 将导致输出。如果你在那里添加 -q,它将被抑制:

ProxyCommand ssh -q proxy nc %h %p

您可能会惊讶于此输出与 Cygwin 无关——它也发生在 Linux 上。

关于bash - cygwin ssh 在退出时给出 "Killed by signal 1",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12639615/

相关文章:

git - 如何在 Windows 上的 Git Bash 中设置 rebase

bash - 使用 AWK 的最小-最大规范化

python - 无法使用 Fabric 和 nohup 真正后台 SSH 隧道

ssh - Apache 米娜 : Get the user's username upon receiving a command

Cygwin 下的 Git Clone 挂了

c++ - 使用 gdb 附加到尚未启动的进程

regex - 如何使用 bash 检查 ASCII 图像的平衡?

linux - 将程序的输出日志传递给函数,同时将返回码存储在变量中

linux - 在 SSH 中按名称查找和替换文件或文件夹

java - 是否有用于 cygwin 的 java sdk?