How to SSH Logon Application Container at Verbose Mode
search cancel

How to SSH Logon Application Container at Verbose Mode

book

Article ID: 297551

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

Cloud Foundry provides the official command line client cf cli (link) for Single SHell (SSH) logon to application containers or invoking commands inside of containers.

cf ssh APP_NAME [-i app-instance-index] [-c command] [-L [bind_address:]port:host:hostport] [--skip-host-validation] [--skip-remote-execution] [--request-pseudo-tty] [--force-pseudo-tty] [--disable-pseudo-tty]
However, in case of network issues, configuration mistakes or other temporary issues, "cf ssh" fails and it only returns a limited error message as shown below:
FAILED
Error opening SSH connection: dial tcp <load balancer IP>:2222: connectex: No connection could be made because the target machine actively refused it. 
This article discusses how to enable SSH verbose mode when accessing application containers for troubleshooting purpose.

 


Environment


Resolution

Follow the steps to resolve this issue:

  1. Retrieve one-time passcode by executing "cf ssh-code".
  2. Retrieve application guid by executing "cf app APP_NAME --guid", replace APP_NAME with your own app name.
  3. SSH logon with "-vv" options appended, please replace APP_GUID and system domain with actual string:
    ssh -vv -p 2222 cf:<APP_GUID>/0@ssh.<system domain>
    
  4. Input passcode retrieved at step 1 when prompted. 
  5. If you are not able to resolve the problem, please don't hesitate to contact Broadcom Support for assistance with the output of step 3. 

 

 

Additional Information

CF CLI does not provide the "scp" option, which can also be implemented in a similar way by executing "scp" directly. This is an example to copy files from container to localhost. 

scp -P 2222 -o User=cf:<APP_GUID>/0 ssh.<system domain>:/<path>/<file name> ./