ssh 命令_在CloudFoundry上打开应用能够用SSH远程登录的命令行

当我试图用如下命令行采用SSH远程登录到运行在CloudFoundry环境下的应用时,

> cf ssh -N -T -L 9229:127.0.0.1:9229 jerry-demo-server

遇到这个错误消息:

> ssh: unable to authenticate, attempted methods [none password], no supported methods remain

d777e933c05fff104c3f806b9dba8325.png

https://stackoverflow.com/questions/47102080/ssh-in-go-unable-to-authenticate-attempted-methods-none-no-supported-method

0b30d02b6c166c8e124047d1990530dc.png

https://pvtl.force.com/s/article/SSH-to-a-Container-Fails-with-ssh-handshake-failed-Error-Message

使用命令行查看我的这个应用的ssh-enabled标志位:

> cf ssh-enabled jerry-demo-server

发现处于disabled状态:

58e509b568c73953e8723716cef1c9bb.png

于是用命令行将这个标志位打开:

cf enable-ssh jerry-demo-server

912b62799bcfe5344742c315f3f62509.png
f3781bad0a279dea5786d0f8de05f572.png

cf ssh-enabled jerry-demo-server

4acec886b5065502110cc61317a4bd2f.png

cf enable-ssh jerry-demo-server

a6332861c6dcb00f6c53980cb39b8d68.png
0c259e5a41566bf1b1398281d10b496a.png

之后重启应用:

66e158ff53122b2a3756a0023bce5cd1.png
80203e9e159f3968da5f41ba95561af9.png

问题解决。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值