code: func (actor Actor) GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex(
  	appName string, spaceGUID string, processType string, processIndex uint,
  ) (SSHAuthentication, Warnings, error) {
  	var allWarnings Warnings
  
  	endpoint := actor.CloudControllerClient.AppSSHEndpoint()
  	if endpoint == "" {
  		return SSHAuthentication{}, nil, actionerror.SSHEndpointNotSetError{}
  	}
  
  	fingerprint := actor.CloudControllerClient.AppSSHHostKeyFingerprint()
  	if fingerprint == "" {
  		return SSHAuthentication{}, nil, actionerror.SSHHostKeyFingerprintNotSetError{}
  	}
  
  	passcode, err := actor.UAAClient.GetSSHPasscode(actor.Config.AccessToken(), actor.Config.SSHOAuthClient())
  	if err != nil {
  		return SSHAuthentication{}, Warnings{}, err
  	}
  
  	application, appWarnings, err := actor.GetApplicationByNameAndSpace(appName, spaceGUID)
  	allWarnings = append(allWarnings, appWarnings...)
  	if err != nil {
  		return SSHAuthentication{}, allWarnings, err
  	}
  
  	if !application.Started() {
  		return SSHAuthentication{}, allWarnings, actionerror.ApplicationNotStartedError{Name: appName}
  	}
  
  	username, processWarnings, err := actor.getUsername(application, processType, processIndex)
  	allWarnings = append(allWarnings, processWarnings...)
  	if err != nil {
  		return SSHAuthentication{}, allWarnings, err
  	}
  
  	return SSHAuthentication{
  		Endpoint:           endpoint,
  		HostKeyFingerprint: fingerprint,
  		Passcode:           passcode,
  		Username:           username,
  	}, allWarnings, err
  }
docs: // GetSecureShellConfigurationByApplicationNameSpaceProcessTypeAndIndex returns
  // back the SSH authentication information for the SSH session.