如何在ADO中的SSH@0任务上将密码和端口添加到Sshendpoint?
代码:
- task: SSH@0
displayName: 'Run shell inline on remote machine'
inputs:
**sshEndpoint: [email protected]**
runOptions: inline
inline: |
cd /
/usr/documents/mql
push context user random pass random;
print context;
我正在遇到问题,试图弄清楚如何将密码和端口添加到sshendpoint输入。.我可以找到关于语法的文档,如果您有有关在哪里可以找到这些文档的提示,请
Code:
- task: SSH@0
displayName: 'Run shell inline on remote machine'
inputs:
**sshEndpoint: [email protected]**
runOptions: inline
inline: |
cd /
/usr/documents/mql
push context user random pass random;
print context;
I am having issues trying to figure out how to add the password and port to the sshEndpoint input.. there's no documentation on syntax that I'm able to find!If you have tips on where to find these documentations pls lmk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您的描述,您正在使用YAML管道中的SSH任务。有关此任务的更多信息,请参阅以下文档:
ssh部署任务-Azure Pipelines | Microsoft文档。
要使用任务,您可以在SSHENDPOINT输入中填写SSH服务连接名称。该任务将尝试使用服务连接设置访问远程计算机。
首先,您需要创建SSH服务连接。请导航到项目设置,然后单击“服务连接”选项卡。您可以创建一个新的服务连接如下:
在服务连接中,请添加主机,端口,用户名和密码。另外,您也可以选择使用专用密钥文件来获得身份验证。这是可选的。
创建服务连接时,您可以复制服务连接名称并将其粘贴到Sshendpoint输入中。请参阅下面的示例。
According to your description, you are using SSH task in YAML pipelines. For more about this task, please refer to this following document:
SSH Deployment task - Azure Pipelines | Microsoft Docs.
To use the task, you could fill a SSH service connection name in the sshEndpoint input. The task will try to access the remote machine with the service connection settings.
First, you need to create a SSH service connection. Please navigate to Project settings and then click into the Service connections tab. You could create a new service connection as below:
In the service connection, please add your host, port, username and password. Alternatively, you could also choose to use the private key file to get authentication. It's optional.
When the service connection is created, you could copy the service connection name and paste it into the sshEndpoint input. Please see the example below.