Improvment: balena CLI ssh into multicontainer device


#1

As many people know, if you try to use the balena CLI to ssh into a multicontainer device you get an error:

$ balena ssh 5f8c609
Connecting to: 5f8c609
BalenaRequestError: Request error: Some v1 endpoints are only allowed on single-container apps

If you need help, don't hesitate in contacting us at:

  GitHub: https://github.com/balena-io/balena-cli/issues/new
  Forums: https://forums.balena.io

While you are working on fixing this, either by redirecting to the Host OS container, or listing the specific containers that can be ssh’d into. Perhaps the above message could be improved by adding a suggestion to ssh into the Host OS container by using the -s switch:

$ balena ssh 5f8c609
Connecting to: 5f8c609
BalenaRequestError: Request error: Some v1 endpoints are only allowed on single-container apps

You can connect to the Host OS container by using the -s switch.
   
Once connected to the Host OS of your device, you can get a list of container ids with:
    balena-engine ps
And then you can 
    balena-engine exec -it <container-id> /bin/sh
to get into the container

If you need help, don't hesitate in contacting us at:

GitHub: https://github.com/balena-io/balena-cli/issues/new
Forums: https://forums.balena.io