CF ssh command - how does it work?

When I login to bluemix, I supply credentials. So my understanding is that there is https connectivity underlying.

I am using cf ssh command to access a bluemix instance. When I added a -v flag, I saw a trace of very first API call.

I am confused about the ssh part because though I did not supply a ssh credential, the ssh is working. My understanding is that the ssh connectivity normally requires ssh credentials. I understand that multiple users can access the instance via ssh. However I am not sure where the ssh credentials come from for the ssh connectivity.

Upvotes: 0

Views: 2260

Answers (1)

dkoper
dkoper

Reputation: 1485

cf ssh basically does an ssh under the hood (using Golang's ssh APIs - it does not call out to an external ssh command) using a username and password as credentials.

The username passed in is the process guid of your app (which is the same as your app guid when using the CC V2 APIs). The password is a one time authorization code it retrieves from UAA (it calls cf ssh-code under the hood).
See also http://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html#other-ssh-access.

cf ssh -v logs the initial HTTP API communication with CC and UAA, but does not log the TCP level calls to the SSH endpoint.

Upvotes: 1

Related Questions