cancel
Showing results for 
Search instead for 
Did you mean: 

Run SSH commands on cloudfoundry / SAP CP

Former Member
0 Kudos
1,478

Hello,

I am currently working in us1.hana.ondemand.com under a space for which ssh is allowed:

- cf ssh-enabled APP
ssh support is enabled for 'APP'

- cf space-ssh-allowed SPACE
ssh support is enabled in space 'SPACE'


But I am not able to run commands like cf ssh : Error opening SSH connection: dial tcp 52.XX.XXX.XXX:2222: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

I would like to know if it is allowed or not to remotely execute commands using ssh tunnels. I would like to enable some debugging options and remote monitoring on non productive applications.

I was not able to find documentation other than from the cloudfoundry documentation itself.
Could you please confirm if I should be able to create that technical tunneling or if it is not supported/allowed and there is no need I investigate further in this area ?

Many thanks.

Guillaume

View Entire Topic
MortenWittrock
Active Contributor
0 Kudos

Hi Guillaume

The cf ssh command lets you SSH into a container instance of a specific application deployed to Cloud Foundry. That's what you're trying to do, right?

I've had trouble SSHing to a container a couple of times, and I've had some success with restarting the application with cf restart APP-NAME after enabling SSH for that particular application with cf enable-ssh APP-NAME.

Regards,

Morten

arpita_jain1
Advisor
Advisor
0 Kudos

Hi Morten,

Yes I am doing cf ssh <appname> into a container instance of a specific application deployed to Cloud Foundry.

The command works when I do it from my system. But when I am trying do this from a VM machine then it fails with the error - Error opening SSH connection: dial tcp XX..XX.XXX.XXX:2222: connectex:

I want to debug the application after opening a tunnel using cf ssh <appname>. Debugging works fine for Waldorf colleagues. But if we try from Bangalore location then there is some issue. That's why I was trying cf ssh on a VM machine located in Waldorf.

Thanks & Regards,

Arpita

MortenWittrock
Active Contributor
0 Kudos

Ah, I see. That sounds like a network connectivity issue to me, since you're able to SSH into the same container from your own machine.