简体   繁体   English

Powershell脚本启动SSH会话

[英]Powershell script to launch SSH session

I was looking to see if there is a script, bat or ps1(preferred), that can be made to launch an ssh session to a remote server. 我一直在寻找是否可以通过脚本,bat或ps1(首选)启动到远程服务器的ssh会话。 I have been using this method for a little and wanted to speed things up when needing to jump into a session. 我一直在使用这种方法,想在需要进入会话时加快速度。

Looking to change directory to the folder with server files - \\server\\folder Then exec: ssh -i key.pem name@1.2.3.4 password Other suggestions are welcome but really prefer powershell as terminal 希望将目录更改为包含服务器文件的文件夹-\\ server \\ folder然后执行: ssh -i key.pem name@1.2.3.4 password其他建议,但确实建议使用ssh -i key.pem name@1.2.3.4 password作为终端

Take a look at PuTTY as well, I've been using it recently to build a pre-deploy script for a .NET Core application, I've managed to get a proper SSH connection I just can't copy the contents of my build to server: 还要看一下PuTTY,最近我一直在使用它来为.NET Core应用程序构建预部署脚本,我设法获得了正确的SSH连接,但是我无法复制构建内容到服务器:

Copying contents of .NET build folder to Ubuntu Server using p-link 使用p-link将.NET构建文件夹的内容复制到Ubuntu Server

Feel free to use what works on there though! 随意使用在这里起作用的东西!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM