油灰隧道设置脚本



目前,我们的用户正在按照以下流程连接到红移数据仓库集群。

1. Open putty --> add jumphost
2. putty --> connection --> data ---> "Auto-login username"
3. putty --> connection --> SSH ---> Auth ---> allow agent forwading
4. putty --> connection --> tunnels ---> {provide source port,destination,add button}
5. After above setting open and then run 2 static commands 

由于用户不懂技术,他们不想使用油灰和做上述配置。因此,我想使用一个脚本来实现自动化,该脚本应该接受username(步骤#2(,从步骤#4输入。用户将运行此脚本并创建到仓库的隧道。

需要一些参考或指导来使用批处理脚本实现这一点。

您可以安装OpenSSH并使用它的所有命令。还有一个Powershell SSH模块,它利用了通过PSGallery提供的.NET:

https://www.powershellgallery.com/packages/Posh-SSH

最新更新