nginx 分发 ssh

Posted code_____monkey

tags:

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

打开nginx的ssl_preread on,使nginx预处理ssl握手client hello字段,通过读取alpn字段为identifyssh(可自定义)字符串 判断出是ssh连接,否则(兼容非ssl连接)都是http连接,分别指向不同的upstream。

 

ssh 连接命令
ssh deploy@120.221.95.76 -o "ProxyCommand openssl s_client -alpn Qdeicc@9902 -ign_eof -connect 120.221.95.76:8086"

以上是关于nginx 分发 ssh的主要内容,如果未能解决你的问题,请参考以下文章

nginx 分发 ssh

nginx 分发 ssh

ssh配置详解及公私钥批量分发

ssh密钥分发之二:使用sshpass配合ssh-kopy-id编写脚本批量分发密钥:

SSH批量分发管理

ssh密钥的分发之一:ssh-copy-id