当我试图用如下命令行采用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://img-blog.csdnimg.cn/img_convert/d777e933c05fff104c3f806b9dba8325.png)
https://stackoverflow.com/questions/47102080/ssh-in-go-unable-to-authenticate-attempted-methods-none-no-supported-method
![0b30d02b6c166c8e124047d1990530dc.png](https://img-blog.csdnimg.cn/img_convert/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](https://img-blog.csdnimg.cn/img_convert/58e509b568c73953e8723716cef1c9bb.png)
于是用命令行将这个标志位打开:
cf enable-ssh jerry-demo-server
![912b62799bcfe5344742c315f3f62509.png](https://img-blog.csdnimg.cn/img_convert/912b62799bcfe5344742c315f3f62509.png)
![f3781bad0a279dea5786d0f8de05f572.png](https://img-blog.csdnimg.cn/img_convert/f3781bad0a279dea5786d0f8de05f572.png)
cf ssh-enabled jerry-demo-server
![4acec886b5065502110cc61317a4bd2f.png](https://img-blog.csdnimg.cn/img_convert/4acec886b5065502110cc61317a4bd2f.png)
cf enable-ssh jerry-demo-server
![a6332861c6dcb00f6c53980cb39b8d68.png](https://img-blog.csdnimg.cn/img_convert/a6332861c6dcb00f6c53980cb39b8d68.png)
![0c259e5a41566bf1b1398281d10b496a.png](https://img-blog.csdnimg.cn/img_convert/0c259e5a41566bf1b1398281d10b496a.png)
之后重启应用:
![66e158ff53122b2a3756a0023bce5cd1.png](https://img-blog.csdnimg.cn/img_convert/66e158ff53122b2a3756a0023bce5cd1.png)
![80203e9e159f3968da5f41ba95561af9.png](https://img-blog.csdnimg.cn/img_convert/80203e9e159f3968da5f41ba95561af9.png)
问题解决。