-
-
Notifications
You must be signed in to change notification settings - Fork 5k
autossh: add Chinese translation #19744
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # autossh | ||
|
|
||
| > 创建,监控或重启 SSH 连接。 | ||
| > 自动重连会确保你的端口转发隧道打开。接受所有 SSH 参数。 | ||
| > 更多信息:<https://manned.org/autossh>. | ||
|
|
||
| - 启动 SSH 会话,当监控 ([M]onitoring) 的端口无法返回数据时,自动重启: | ||
|
|
||
| `autossh -M {{监控_端口}} "{{ssh_命令}}"` | ||
|
|
||
| - 将本地 ([L]ocal) 端口转发到远程端口,必要时重启转发: | ||
|
|
||
| `autossh -M {{监控_端口}} -L {{本地_端口}}:localhost:{{远程_端口}} {{用户名}}@{{主机名}}` | ||
|
|
||
| - 在执行 SSH 命令前,将 `autossh` 切换到后台,不 ([N]ot) 启动远程 shell: | ||
|
|
||
| `autossh -f -M {{监控_端口}} -N "{{ssh_命令}}"` | ||
|
|
||
| - 后台运行,不监控端口,而是每 10 秒发送 SSH 心跳包 (SSH keep-alive packet) 来检测掉线: | ||
|
|
||
| `autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" "{{ssh_命令}}"` | ||
|
|
||
| - 后台运行,不监控端口,不启动远程 shell,当端口转发掉线时退出: | ||
|
|
||
| `autossh -f -M 0 -N -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" -o ExitOnForwardFailure=yes -L {{本地_端口}}:localhost:{{远程_端口}} {{用户名}}@{{主机名}}` | ||
|
|
||
| - 后台运行,将 `autossh` 调试输出和 SSH 详细输出写入到文件: | ||
|
|
||
| `AUTOSSH_DEBUG=1 AUTOSSH_LOGFILE={{路径/到/autossh_日志_文件.log}} autossh -f -M {{监控_端口}} -v -E {{路径/到/ssh_日志_文件.log}} {{ssh_命令}}` | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
翻译为“运行” SSH 连接是否有点奇怪?通常不会说运行连接。根据语境,这里
run应该表示先让程序跑起来,这样就产生了 SSH 连接。结合后面的监控和重启,可见 autossh 是一个管理 SSH 全过程的命令行工具,所以翻译为创建,是否更加贴合原文的意思呢?I think using '创建' here is better than '运行', since this phrase can fit into the context in Chinese better. See the Chinese comment above for a detailed explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I didn't think it through carefully enough. LGTM.Thanks for your contribution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find a description of
runin the man page.Therefore, the description in the English text may be imprecise.NAME autossh — monitor and restart ssh sessions