小编Son*_*ton的帖子

替换 ~/.ssh/config 中的 ProxyJump

我正在使用ProxyJump我的~/.ssh/config

Host jump                                                                          
  User jane                                                                       
  HostName 1.2.3.4
  DynamicForward 1028
Host dev                                                                        
  User bill                                                                      
  HostName 5.6.7.8                                                          
  ProxyJump jump
Run Code Online (Sandbox Code Playgroud)

我的同事使用的是旧版本的 ssh(他们无法更新)。允许他们通过跳转主机连接的等效配置是什么?将DynamicForward仍然工作?

ssh

45
推荐指数
1
解决办法
3万
查看次数

Do sed-like delete commands in vim

I'm comfortable doing search/replace in vim, but how do I delete all lines in a file (or between certain lines) if they match a condition? Currently I shell out and run a sed command, for example:

sed -i '/^CRITICAL/d' hosts
Run Code Online (Sandbox Code Playgroud)

(delete all the lines that start with CRITICAL from the hosts file).

How would I do this in vim?

vim

1
推荐指数
1
解决办法
152
查看次数

标签 统计

ssh ×1

vim ×1