當我試圖用如下命令行采用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


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狀態:

於是用命令行將這個標志位打開:
cf enable-ssh jerry-demo-server


cf ssh-enabled jerry-demo-server

cf enable-ssh jerry-demo-server


之后重啟應用:


問題解決。
要獲取更多Jerry的原創文章,請關注公眾號"汪子熙":

