简体   繁体   English

Cloud Foundry SSH无法正常工作

[英]Cloud foundry SSH not working

I am not able to make SSH working. 我无法使SSH正常工作。
I checked that SSH is enable on the Application and Space level. 我检查了在应用程序和空间级别上是否启用了SSH。 But when i ran 但是当我跑步时

cf ssh "MY-APP-NAME" i get the following error: cf ssh "MY-APP-NAME"我收到以下错误:

FAILED
Error: SSH session allocation failed: ssh: unexpected packet in response to 
channel open: <nil>

I also tried to connect without CLi and using the command 我也尝试不使用CLi并使用命令进行连接

ssh -p 2222 cf:abcdefab-1234-5678-abcd-1234abcd1234/0@ssh.MY-DOMAIN.com But when i entered the password the server stopped the connection (i used Putty). ssh -p 2222 cf:abcdefab-1234-5678-abcd-1234abcd1234/0@ssh.MY-DOMAIN.com但是,当我输入密码时,服务器停止了连接(我使用了Putty)。

I am trying to access with SSH because i need to launch npm install to install the dependencies of my application. 我尝试使用SSH访问,因为我需要启动npm install来安装我的应用程序的依赖项。

Thank you for your help 谢谢您的帮助

There is no need to ssh into an app to install dependencies. 无需通过ssh进入应用程序即可安装依赖项。 Please have a look at Swisscoms Getting Started Guide for Node.js: https://docs.developer.swisscom.com/tutorial-nodejs/index.html The section 'Declare App Dependencies' ( https://docs.developer.swisscom.com/tutorial-nodejs/dependencies.html ) shows you how you specify the dependencies in a file called 'package.json'. 请看看Swisscoms入门指南的Node.js: https://docs.developer.swisscom.com/tutorial-nodejs/index.html的部分“声明应用程序依赖”( HTTPS://docs.developer.swisscom .com / tutorial-nodejs / dependencies.html )向您展示了如何在名为“ package.json”的文件中指定依赖项。 This will then be automatically installed by the nodejs buildpack ( https://github.com/cloudfoundry/nodejs-buildpack ). 然后,它将由nodejs buildpack( https://github.com/cloudfoundry/nodejs-buildpack )自动安装。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM