Error SSH to device via balena-cli


#1
  • Cli version: 9.7.0
  • Standalone install: no
  • Node version: 8.11.4
  • Npm version: 6.5.0
  • Operating system and architecture: Linux Ubuntu 18.04.1 LTS

$ balena device 79a1dd9
== HIDDEN SKY
ID: 8
DEVICE TYPE: imx6ul-var-dart
STATUS: idle
IS ONLINE: true
APPLICATION NAME: imx6ulApp
UUID: 79a1dd9c1bacdc79661d1afd31e7c52b
COMMIT: fc2e2716d8c8913ae434a0f05f9ed713
SUPERVISOR VERSION: 8.6.3
OS VERSION: balenaOS 2.28.0+rev2
DASHBOARD URL: https://dashboard.mydomain.com/devices/79a1dd9c1bacdc79661d1afd31e7c52b/summary

But when :

$ balena ssh 79a1dd9
Connecting to: 79a1dd9
BalenaRequestError: Request error: tunneling socket could not be established, cause=connect ECONNREFUSED 172.18.0.6:3128

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

Any clues ?


SSH: Could not resolve hostname
#4

Hi @rlev,

This issue appears to be unrelated to ssh domain name.

I looks like it is more likely something to do with network configuration on either host instance or remote device.

I believe 172.18.0.6 is the IP of address of your remote device running Balena host OS? The first thing I would do is start using some network tools like telnet to check that your Balena instance can reach the device at that IP and then check if there is anything listening on that port.

$ telnet 172.18.0.6 3128

Cheers
Chris


SSH: Could not resolve hostname
#5

Hi @dash

I’m getting the same problem. I also get the same thing for the device reboot and device shutdown commands. The IP address shown in my case is 172.18.0.7. This is not the device IP, but the IP of the balena/open-balena-registry Docker container as per the below:

# docker exec openbalena_registry_1_7b865c92e558 ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
254: eth0@if255: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:ac:12:00:07 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.18.0.7/16 brd 172.18.255.255 scope global eth0
       valid_lft forever preferred_lft forever

Anyone got an ideas? Thanks


#6

@violuke see @richbayliss’s response to this thread:

SSH is a work in progress for openBalena, I suspect the same for reboot and shutdown.

Cheers
Chris


#7

Ah, thanks Chris, I’d not seen that, makes sense :+1:


#8

Do note that local SSH works, remote isn’t and it’s what we’re working on. That means if you need to SSH into devices on your local network you can do so with balena ssh LOCAL_DEVICE_IP.


#9

Do note that local SSH works, remote isn’t and it’s what we’re working on. That means if you need to SSH into devices on your local network you can do so with balena ssh LOCAL_DEVICE_IP.


#11

I thought you might like to follow these steps to get SSH working to your devices on openBalena… SSH into host device

This is a workaround until we get the balena CLI updated to include it directly :ok_hand:


#19

Thank you for the guide @richbayliss