MobaXterm setting autocomplete

Posted lvmxh

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了MobaXterm setting autocomplete相关的知识,希望对你有一定的参考价值。

autocomplete-server-names-for-ssh-and-scp

 

mkdir /etc/bash_completion.d

cat  >> /etc/bash_completion.d/ssh << EOF
_ssh() 
{
    local cur prev opts
    COMPREPLY=()
    cur="\${COMP_WORDS[COMP_CWORD]}"
    prev="\${COMP_WORDS[COMP_CWORD-1]}"
    opts=\$(grep ^Host ~/.ssh/config ~/.ssh/config.d/* | grep -v ‘[?*]‘ | cut -d ‘ ‘ -f 2-)

    COMPREPLY=( \$(compgen -W "\$opts" -- \${cur}) )
    return 0
}
complete -F _ssh ssh
EOF

echo ". /etc/bash_completion.d/ssh" >> ~/.profile
mdkir -p ~/.ssh/config.d/
touch ~/.ssh/config.d/fake.conf

 

cat >> ~/.ssh/config << EOF
Host public
    HostName 10.238.153.33
    User team
    IdentityFile ~/.ssh/id_rsa.team

Host 10.0.0.*
    User ubuntu
    IdentityFile ~/.ssh/id_rsa.team
    ProxyCommand ssh public nc %h %p

Host cyborg-1
    HostName 10.0.0.44
    User ubuntu
    IdentityFile ~/.ssh/id_rsa.team
    ProxyCommand ssh public nc %h %p
EOF

 

以上是关于MobaXterm setting autocomplete的主要内容,如果未能解决你的问题,请参考以下文章

MobaXterm日常MobaXterm远程连接经常中断问题解决

python yt-autocomment.py

MobaXterm监控服务器的资源(CPURAMNetworkdisk...) 使用情况

MobaXterm监控服务器的资源(CPURAMNetworkdisk...) 使用情况

技术Windows连接Linux主机,解决MobaXterm不时地自我断开的问题

mobaxterm session stopped 怎么回事