powershell - putty中隧道设置的脚本
问题描述
目前我们的用户正在按照以下流程连接到 redshiftdata 仓库集群。
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
作为不精通技术的用户,他们不想使用腻子并进行上述配置。所以我想使用一个脚本自动执行此操作,该脚本应该采用用户名(步骤#2),来自步骤#4的输入。用户将运行此脚本并创建到仓库的隧道。
需要一些参考或指导来使用批处理脚本来实现这一点。
解决方案
您可以安装 OpenSSH 并使用它的所有命令。还有一个 Powershell SSH 模块,它利用 PSGallery 提供的 .NET:
推荐阅读
- python - Pycharm找不到python.exe
- python - 没有参数/可迭代的函数的多处理池?
- javascript - 来自 Object 的数组为空。Javascript 和反应
- wpf - 文本未在修改按钮中居中
- arrays - 在数组列表中连接嵌套数组
- mailkit - Mailkit 和在 IMAP 上的 html 邮件中搜索
- flutter - Flutter:Dart 解压并保存来自 http 的响应
- cassandra - 在火花流应用程序中加入数据的最佳方法是什么?
- java - 每当我将 @Component 添加到我的 Spring 程序时,启动都不会启动
- javascript - wordpress 中的特定 Wp Enqueue 脚本