mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-21 02:10:11 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
023c52b443
@ -0,0 +1,122 @@
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "hom"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-12632-1.html"
|
||||
[#]: subject: "Manage your SSH connections with this open source tool"
|
||||
[#]: via: "https://opensource.com/article/20/9/ssh-connection-manager"
|
||||
[#]: author: "Kenneth Aaron https://opensource.com/users/flyingrhino"
|
||||
|
||||
使用开源工具 nccm 管理 SSH 连接
|
||||
======
|
||||
|
||||
> 使用 nccm 让你的终端连接 SSH 会话更快、更稳、更轻松。
|
||||
|
||||

|
||||
|
||||
OpenSSH 很常用,但没有一个知名的连接管理器,因此我开发了 ncurses SSH 连接管理器(`nccm`)来填补这个重要的空白。 `nccm` 是一个简单的 SSH 连接管理器,具有非常便于移植的终端界面(就如项目名称所示,使用 ncurses 编写)。最重要的是,它使用起来非常简单。有了 `nccm`,你可以花费最少的精力和最少的按键连接到你选择的 SSH 会话。
|
||||
|
||||
### 安装 nccm
|
||||
|
||||
最快的方式是从它的 [Git 仓库][2]克隆该项目:
|
||||
|
||||
```
|
||||
$ git clone https://github.com/flyingrhinonz/nccm nccm.git
|
||||
```
|
||||
|
||||
在 `nccm.git/nccm` 的文件夹中有两个文件:`nccm` 自身和 `nccm.yml` 配置文件。
|
||||
|
||||
首先将 `nccm` 脚本复制到系统目录 `/usr/local/bin/` 中并添加执行权限,也可以通过使用`install` 命令来完成操作:
|
||||
|
||||
```
|
||||
$ sudo install -m755 nccm –target-directory /usr/local/bin
|
||||
```
|
||||
|
||||
文件 `nccm.yml` 可以拷贝到以下任意一个位置,默认从找到的第一个位置获取配置:
|
||||
|
||||
* `~/.config/nccm/nccm.yml`
|
||||
* `~/.nccm.yml`
|
||||
* `~/nccm.yml`
|
||||
* `/etc/nccm.yml`
|
||||
|
||||
`nccm` 需要在 Python 3 的环境中运行,这在大部分的 Linux 环境是没问题的。大多数 Python 库的依赖包已经作为 Python 3 的一部分存在,但是,有一些 YAML 的依赖包和实用程序是你必须安装的。
|
||||
|
||||
如果你没有安装 `pip`,你可以使用包管理器来安装它。在安装的同时,也请安装 `yamllint` 应用程序来帮助你验证 `nccm.yml` 文件。
|
||||
|
||||
在 Debian 或类似系统使用 `apt` 命令:
|
||||
|
||||
```
|
||||
$ sudo apt install python3-pip yamllint
|
||||
```
|
||||
|
||||
在 Fedora 或者类似系统使用 `dnf` 命令:
|
||||
|
||||
```
|
||||
$ sudo dnf install python3-pip yamllint
|
||||
```
|
||||
|
||||
`PyYAML` 也是必须安装的,可以通过使用 `pip` 来安装:
|
||||
|
||||
```
|
||||
$ pip3 install --user PyYAML
|
||||
```
|
||||
|
||||
### 使用 nccm
|
||||
|
||||
开始之前,需要修改 `nccm.yml` 文件来添加 SSH 连接配置,可以参照示例文件格式化 YAML 文件。仿照示例文件在开头添加连接名称,配置项使用两个空格缩进。不要忘了冒号(`:`),这是 YAML 的语言的格式。
|
||||
|
||||
不要担心你的 SSH 会话信息以何顺序排列,因为 `nccm` 在程序内提供了排序的方式。
|
||||
|
||||
如果修改完成,可以使用 `yamllint` 来校验配置:
|
||||
|
||||
```
|
||||
$ yamllint ~/.config/nccm/nccm.yml
|
||||
```
|
||||
|
||||
如果没有错误信息返回,说明文件的内容格式是正确的,可以进行下面的步骤。
|
||||
|
||||
如果 `nccm` 可以[从你的路径][3]中找到并且可以执行,那么输入 `nccm` 就可以启动 TUI(文本用户界面)了。如果你看到 Python 3 抛出的异常,请检查依赖包是否正确安装,任何异常都应该提到缺少的依赖包。
|
||||
|
||||
只要你没有在 YAML 配置文件中更改 `ncm_config_control` 模式,那么你可以使用以下的键盘按键来控制:
|
||||
|
||||
* `Up`/`Down` 方向键 - 移动光标
|
||||
* `Home`/`End` - 跳转到文件开始和结尾
|
||||
* `PgUp`/`PgDn` - 以页为单位查看
|
||||
* `Left`/`Right` 方向键 - 水平滚动
|
||||
* `TAB` - 在文本框之间移动
|
||||
* 回车 - 连接选中的 SSH 会话
|
||||
* `Ctrl-h` - 显示帮助菜单
|
||||
* `Ctrl-q`/`Ctrl-c` - 退出
|
||||
* `F1`-`F5` 或 `!` `@` `#` `$` `%` - 按 1-5 列排序
|
||||
|
||||
使用 `F1` 到 `F5` 来按 1-5 列排序,如果你的设备占用了这些 `F1` - `F5` 键,你可以使用`!` `@` `#` `$` `%` 来替代。默认界面显示 4 列内容,但我们将用户名和服务器地址作为单独的列来排序,这样我们就有了 5 个排序方式。你也可以通过再次按下排序的按键来逆转排序。在选中的行上按回车可以建立会话。
|
||||
|
||||
![nccm screenshot terminal view][4]
|
||||
|
||||
在 `Filter` 文本框中输入过滤内容,会用输入的内容以“与”的关系来过滤输出内容。这是不区分大小写的,而条目间用空白分隔。在 `Conn` 部分也是如此,但在这里按回车键可以连接到那个特定的条目编号。
|
||||
|
||||
这个工具还有许多功能需要你去发掘,比如专注模式,这些部分留下等待你去探索,也可以查看项目主页或者内置的帮助文档查看更多细节内容。
|
||||
|
||||
项目的 YAML 配置文件的文档是完善的,所以你可以查阅修改使 `nccm` 使用起来更加顺手。`nccm` 项目是非常希望得到你的反馈的,所以你可以复刻该项目然后添加更多新功能,欢迎大家提出拉取请求。
|
||||
|
||||
### 使用 nccm 来放松连接 SSH 的压力
|
||||
|
||||
像我一样,我希望这个工具可以对你有用,感谢能够为开源工作增加自己的贡献,请接受 `nccm` 作为我对开源项目自由、高效工作所做的贡献。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/9/ssh-connection-manager
|
||||
|
||||
作者:[Kenneth Aaron][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[hom](https://github.com/hom)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/flyingrhino
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguins.png?itok=yKOpaJM_ "Penguins"
|
||||
[2]: https://github.com/flyingrhinonz/nccm
|
||||
[3]: https://opensource.com/article/17/6/set-path-linux
|
||||
[4]: https://opensource.com/sites/default/files/uploads/nccm_screenshot.png "nccm screenshot terminal view"
|
@ -0,0 +1,59 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (3 ways to protect yourself from imposter syndrome)
|
||||
[#]: via: (https://opensource.com/article/20/9/imposter-syndrome)
|
||||
[#]: author: (Josh Atwell https://opensource.com/users/joshatwell)
|
||||
|
||||
3 ways to protect yourself from imposter syndrome
|
||||
======
|
||||
It can be hard to believe you deserve success, sometimes, but these tips
|
||||
can help you combat impostor syndrome and accept the accolades you've
|
||||
earned.
|
||||
![Brain on a computer screen][1]
|
||||
|
||||
Poet and activist Maya Angelou published many books throughout her storied career, but each time, she feared people would figure out that she'd "run a game on everybody, and they're going to find me out." This seems an odd response from a well-honored writer. What she is describing is her own challenge with imposter syndrome.
|
||||
|
||||
Think for a moment about your own accomplishments. Being hired into a new role. Having your first [open source contribution][2] merged into the project. Receiving an award or recognition. Being invited to participate in a project or event with people you respect and look up to. Did you question whether you belonged there? Did you fear people would "know that you didn't belong?" There is an extremely high likelihood that you have also experienced imposter syndrome. Please check the survey at the end of this article to see that you're not alone.
|
||||
|
||||
Imposter syndrome is a "[psychological term][3] referring to a pattern of behavior where people doubt their accomplishments and have a persistent, often internalized fear of being exposed as a fraud." It's not considered a disorder, but it's persistent and can keep you from trying new things, accepting praise, or enjoying success. It's also important to understand that imposter syndrome is indiscriminate to gender, race, or nationality. Anyone can be impacted. Fortunately, you can be prepared for when imposter syndrome rears its ugly head.
|
||||
|
||||
How do you protect yourself from letting imposter syndrome limit you? Here are three techniques that you can start using right away:
|
||||
|
||||
**1\. Feelings vs. facts**—It's important to understand that imposter syndrome is a feeling and doesn't represent a factual assessment of your value or acceptance. Instead of thinking, "I don't deserve to be here," say to yourself, "I'm here because I earned it," or "I trust the judgment of those who invited me here that I truly deserve to be here." Ask yourself if the negative thoughts are from facts or a story you are telling yourself. This simple shift in focus from feelings to facts can set you back on the right course.
|
||||
|
||||
![3 panels, woman says "I don't deserve to be here." with red X on top, woman says "I should trust the judgment of people who invited me." with green check, woman says "I deserve to be here." with green check][4]
|
||||
|
||||
**2\. "Outsider" does not equal "fraud"**—Simply because your peer group has changed does not mean that you do not belong. Inclusion in higher levels of an organization, accomplished industry peers, or a group of award recipients is almost always a result of meaningful contributions. That first day of school feeling never goes away, even if it's remote school. So, unless you are legitimately a party crasher, keep in mind that you have value to add to the group and share it, even if you are nervous at first.
|
||||
|
||||
**3\. Faking it**—Unfortunately, it's not universally understood that people learn how to do the job AFTER they get the job. There are few better ways to set yourself up for continued success than first believing that additional success is possible. Just be mindful not to fall into the trap of the cognitive bias known as the Dunning-Kruger effect, which leads people to vastly overestimate their capabilities. "Fake it until you make it," but commit to continued learning.
|
||||
|
||||
There are so many ways imposter syndrome can disrupt both our professional and personal lives, but with some awareness and preparation, you can avoid letting it limit your growth and success. These are just a few ways to address imposter syndrome. For more information, you can also visit <https://impostorsyndrome.com/>.
|
||||
|
||||
[In this survey][5], we'd like to ask you to provide some information based on your experiences, which we'll use to help further inform the community about imposter syndrome and how prevalent it is in our industry.
|
||||
|
||||
![Green chalkboard image reading "Take the Survey!"][6]
|
||||
|
||||
This post includes excerpted content from an upcoming community presentation titled "Imposter Syndrome First Aid Kit" by Josh Atwell and Amy Lewis. If you're interested in hearing the full presentation, you can check it out at Splunk .conf20 on October 20-21. Registration is available at <http://conf.splunk.com>.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/9/imposter-syndrome
|
||||
|
||||
作者:[Josh Atwell][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/joshatwell
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/brain_computer_solve_fix_tool.png?itok=okq8joti (Brain on a computer screen)
|
||||
[2]: https://opensource.com/article/19/11/my-first-open-source-contribution-impostor-syndrome
|
||||
[3]: https://www.psychologytoday.com/us/blog/real-women/201809/the-reality-imposter-syndrome
|
||||
[4]: https://opensource.com/sites/default/files/uploads/impostor_syndrome_1.png (Person progresses through stages of impostor syndrome)
|
||||
[5]: https://pollev.com/amylewis963?_ga=2.60457517.1623261502.1598557790-809388036.1598557790
|
||||
[6]: https://opensource.com/sites/default/files/uploads/impostor_syndrome_survey.png (Green chalkboard image reading "Take the Survey!")
|
@ -1,131 +0,0 @@
|
||||
[#]: collector: "lujun9972"
|
||||
[#]: translator: "hom"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
[#]: subject: "Manage your SSH connections with this open source tool"
|
||||
[#]: via: "https://opensource.com/article/20/9/ssh-connection-manager"
|
||||
[#]: author: "Kenneth Aaron https://opensource.com/users/flyingrhino"
|
||||
|
||||
使用开源工具 `nccm` 管理 `SSH` 连接
|
||||
======
|
||||
使用 `nccm` 让你的终端连接更快,更稳定
|
||||
![Penguins][1]
|
||||
|
||||
`OpenSSH`很常用,但是仍然有其他的连接工具,因此我开发了 `nccm`来使运行进程更高效。 `nccm` 是一个使用标准终端接口(就像项目所命名的`ncurses`)的建议终端连接工具
|
||||
|
||||
### 安装 nccm
|
||||
|
||||
最简单的方式是从这个 [仓库][2]下载
|
||||
|
||||
|
||||
```
|
||||
`$ git clone https://github.com/flyingrhinonz/nccm nccm.git`
|
||||
```
|
||||
|
||||
在`nccm.git/nccm`的文件夹中有两个文件:`nccm`执行文件和`nccm.yml`配置文件
|
||||
|
||||
首先将执行文件`nccm`拷贝到系统目录`/usr/local/bin/`中并添加执行权限,也可以通过使用`install`命令来完成操作
|
||||
|
||||
|
||||
```
|
||||
$ sudo install -m755 nccm
|
||||
–target-directory /usr/local/bin
|
||||
```
|
||||
|
||||
配置文件`nccm.yml`可以拷贝到以下任意一个文件夹中,终端会默认从第一个顺序获取配置。
|
||||
|
||||
* `~/.config/nccm/nccm.yml`
|
||||
* `~/.nccm.yml`
|
||||
* `~/nccm.yml`
|
||||
* `/etc/nccm.yml`
|
||||
|
||||
|
||||
|
||||
`nccm`需要在`Python 3`的环境中运行,因此你的电脑需要事先安装`Python 3`,大部分的环境依赖在`Python 3`中默认安装了。以下是必须要安装的`YAML`依赖
|
||||
|
||||
如果为暗中`pip`,你需要使用包管理器来安装,然后安装`yamlinit`包来验证安装`nccm.yml`
|
||||
|
||||
在`Debian`或相似系统使用`apt`命令:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo apt install python3-pip yamllint`
|
||||
```
|
||||
|
||||
在`Fedora`或者相似系统使用`dnf`:
|
||||
|
||||
|
||||
```
|
||||
`$ sudo dnf install python3-pip yamllint`
|
||||
```
|
||||
|
||||
`PyYAML`也是必须安装的,可以通过使用`pip`来安装
|
||||
|
||||
|
||||
```
|
||||
`$ pip3 install --user PyYAML`
|
||||
```
|
||||
|
||||
### 使用`nccm`
|
||||
|
||||
开始之前需要修改`nccm.yml`文件来添加终端连接配置,可以参照示例文件格式化`YAML`文件。仿照示例文件再开始行添加连接名称,文件使用两个空格缩进。不要忘了`YAML`的语言类型
|
||||
|
||||
不要担心你的终端登录信息以何顺序排列,`nccm`会提示用户如何排序
|
||||
|
||||
如果修改完成,可以使用`yamllint`来校验配置
|
||||
|
||||
|
||||
```
|
||||
`$ yamllint ~/.config/nccm/nccm.yml`
|
||||
```
|
||||
|
||||
如果没有错误信息返回,说明文件的内容格式是正确的,可以进行下面的步骤
|
||||
|
||||
如果`nccm`可以从 [环境变量][3] 中找到并且可以执行,由于`nccm`会加载 TUI 来执行界面操作,因此需要查看`Python3`的执行环境,依赖包是否正确安装,缺少任一依赖都会在命令行中展示出来
|
||||
|
||||
只要你没有在配置文件中更改`ncm_config_control mode`,你可以使用以下的键盘按键来控制
|
||||
|
||||
* 上/下方向键 - 移动光标
|
||||
* Home/End -跳转到文件开始和结尾
|
||||
* PgUp/PgDn - 以页为单位查看
|
||||
* 左/右 方向键 - 水平滚动
|
||||
* TAB - 在字块中移动
|
||||
* 回车 - 连接选中的终端
|
||||
* Ctrl-h -显示帮助菜单
|
||||
* Ctrl-q or Ctrl-c - 退出
|
||||
* F1-F5 or !@#$% - 在列(1-5)之间切换
|
||||
|
||||
|
||||
|
||||
使用`F1`到`F5`来切换列,如果你的设备`Fn`键冲突你可以使用`!@#$%`来替代。默认界面显示 4 列内容,但是可以通过将用户名和服务地址分隔开来显示 5 列。你也可以通过再次使用和第一次过滤相同的按键来切换显示,选中的行会高亮显示
|
||||
|
||||
![nccm screenshot terminal view][4]
|
||||
|
||||
在过滤条件中输入过滤内容,会将包含的内容过滤显示,过滤的关键词是大小写敏感的,字符中间的空格不是必须的。在`Conn`部分也是同样的输入限制,然后按回车键就可以选中所输入的序号配置
|
||||
|
||||
这个工具还有许多功能需要你去发掘,比如专注模式,这些部分留下等待你去探索,也可以查看项目主页或者内置的帮助文档查看更多细节内容
|
||||
|
||||
项目的`YAML`配置文件的文档是完善的,所以你可以查阅修改使你的终端工具使用起来更加顺手。`nccm`项目是非常希望得到你的反馈的,所以你可以 fork 该项目然后添加更多新功能,我们欢迎你的合并请求。
|
||||
|
||||
### 轻松使用 nccm来连接 SSH
|
||||
|
||||
我希望这个工具可以对您有用,感谢能够为开源工作增加自己的贡献,请接收`nccm`作为我对开源项目自由、高效工作所做的贡献
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://opensource.com/article/20/9/ssh-connection-manager
|
||||
|
||||
作者:[Kenneth Aaron][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[hom](https://github.com/hom)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://opensource.com/users/flyingrhino
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/linux-penguins.png?itok=yKOpaJM_ "Penguins"
|
||||
[2]: https://github.com/flyingrhinonz/nccm
|
||||
[3]: https://opensource.com/article/17/6/set-path-linux
|
||||
[4]: https://opensource.com/sites/default/files/uploads/nccm_screenshot.png "nccm screenshot terminal view"
|
Loading…
Reference in New Issue
Block a user