我的客户端如何针对IBMBluemixCloudFoundry应用程序执行diego-ssh代理身份验证



我有兴趣使用sshscpsftp等客户端工具与我的IBM Bluemix CloudFoundry应用程序进行交互。

具体来说,有一个由我的应用程序web安装程序创建的动态生成的文件/文件夹,我想在本地下载到我的笔记本电脑上。

我已经阅读了最近的Diego启用,我有兴趣利用这里讨论的Diego-ssh代理身份验证功能。

使用Cloud Foundry cf命令行界面并遵循此处的diego ssh指南,您可以完成如下客户端代理身份验证:

$cf ssh code | pbcopy#在提示输入密码时粘贴授权码

然后可以将此授权码用作调用以下命令的密码:

#直接SSH客户端交互$ssh-p 2222 cf:$(cf app your_bluemix_app_name--guid)/0@api.ng.bluemix.net#安全复制$scp-P 2222-o用户=cf:$(cf app your_bluemix_app_name--guid)/0 my-local-file.jsonapi.ng.bluemix.net:my-remote-file.json#安全FTP传输(GET、PUT…)$sftp-P 2222 cf:$(cf app your_bluemix_app_name--guid)/0@api.ng.bluemix.net

bluemix的关键细节是了解其cf api端点:

 nbsp nbsp nbsp地区名称 nbsp nbsp nbsp   nbsp nbspCF API终点 nbsp nbsp
nbsp nbsp nbsp;美国南部地区 nbsp nbsp  nbsp nbsp;api.ng.bluemix.net nbsp 
英国地区  api.eu gb.bluemix.net 
nbsp nbsp nbsp nbsp;悉尼地区 nbsp nbsp nbsp  ;api.au-syd.bluemix.net

通过这些客户端的某种组合,您可以在本地和Bluemix CF应用程序环境之间无缝移动文件,以满足各种最终用户开发需求。

以下是一个示例交互:

$sftp-P 2222 cf:$(cf app goldi--guid)/0@api.ng.bluemix.net无法确定主机"[api.ng.bluemix.net]:2222([158.851.618]:2222)"的真实性。RSA密钥指纹是SHA256:ACXxxxxxxxxxxxxxxxxxxxxXXXXXXxxxxxxxxxxxxxxx8。是否确实要继续连接(是/否)?对警告:已将"[api.ng.bluemix.net]:2222,[15.85.156.18]:2222'(RSA)永久添加到已知主机列表中。cf:59xxxxx3-4xxa-4xxx-xxxe-x0x@api.ng.bluemix.net的密码:已连接到api.ng.bluemix.net。sftp>

最新更新