SSH connection refused on Mark1 after enabling SSH login via button/knob


#1

Mark1 is connected via wired ethernet, confirmed by successful home.mycroft.ai registration and successful answers to some questions, and I get ping replies from the unit. I’m also pretty confident that I am attempting SSH connection from a client with an IP address on the same IP subnet.

However, after following procedure to enable SSH logins, (and Mycroft gave the audible confirmation that “SSH logins are now allowed”) followed by reboot, SSH connections are still refused by Mycroft. I’ve also tried a power-cycle.

Have I missed something? Suggestions for something else to try most welcome.


#2

Thanks for flagging this, @jrwarwick - are you able to paste the output of your terminal so we can debug further? Which SSH client are you using / which operating system are you on?

Kind regards,
Kathy


#3

Thanks for getting back to me, Kathy. This is a pretty vanilla Ubuntu on x86 situation. Details and ssh output below:

jrw@katana:~$ cat /etc/issue ; uname -a
Ubuntu 13.10 \n \l

Linux katana 3.11.0-26-generic #45-Ubuntu SMP Tue Jul 15 04:04:15 UTC 2014 i686 i686 i686 GNU/Linux
jrw@katana:~$ ssh -V
OpenSSH_6.2p2 Ubuntu-6ubuntu0.5, OpenSSL 1.0.1e 11 Feb 2013
jrw@katana:~$  ip addr show eth2
2: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether f0:4d:a2:2f:02:20 brd ff:ff:ff:ff:ff:ff
    inet 10.199.4.75/23 brd 10.199.5.255 scope global eth2
       valid_lft forever preferred_lft forever
jrw@katana:~$ ping -c 2 mark1.local
PING mark1.local (10.199.4.191) 56(84) bytes of data.
64 bytes from mark1.local (10.199.4.191): icmp_seq=1 ttl=64 time=0.277 ms
64 bytes from mark1.local (10.199.4.191): icmp_seq=2 ttl=64 time=0.285 ms

--- mark1.local ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.277/0.281/0.285/0.004 ms
jrw@katana:~$ sudo nmap -sS mark1.local

Starting Nmap 6.40 ( http://nmap.org ) at 2017-12-05 07:47 PST
Nmap scan report for mark1.local (10.199.4.191)
Host is up (0.00027s latency).
Not shown: 999 filtered ports
PORT   STATE  SERVICE
22/tcp closed ssh
MAC Address: B8:27:EB:56:C8:EC (Raspberry Pi Foundation)

Nmap done: 1 IP address (1 host up) scanned in 5.08 seconds
jrw@katana:~$ ssh -v pi@mark1.local
OpenSSH_6.2p2 Ubuntu-6ubuntu0.5, OpenSSL 1.0.1e 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to mark1.local [10.199.4.191] port 22.
debug1: connect to address 10.199.4.191 port 22: Connection refused
ssh: connect to host mark1.local port 22: Connection refused

Less detailed, but similar results from a separate Windows 10 client using PuTTY ssh client.

2017-12-05 08:01:50	Connecting to 10.199.4.191 port 22
2017-12-05 08:01:50	We claim version: SSH-2.0-PuTTY_Release_0.70
2017-12-05 08:01:53	Failed to connect to 10.199.4.191: Network error: Connection refused
2017-12-05 08:01:53	Network error: Connection refused

Does Mycroft have a preference for Wi-Fi? I have not configured that (and would prefer not to, if I have the option).


#4

Thanks @jrwarwick for that extra information.

ssh on my Mark 1 is enabled, and when I run an nmap this is what I get:

Starting Nmap 7.01 ( https://nmap.org ) at 2017-12-06 22:46 AEDT
Note: Host seems down. If it is really up, but blocking our ping probes, try -Pn
Nmap done: 1 IP address (0 hosts up) scanned in 3.03 seconds
kathyreid@kathyreid-N76VZ:~$ nmap -Pn 192.168.0.2

Starting Nmap 7.01 ( https://nmap.org ) at 2017-12-06 22:47 AEDT
Nmap scan report for 192.168.0.2
Host is up (0.0075s latency).
Not shown: 999 filtered ports
PORT   STATE SERVICE
22/tcp open  ssh

If you run nmap is the port open?

Is your modem/router port filtering on port 22 at all?

(I’m on Ubuntu 16.04 here so comparable)

Best, Kathy


#5

According to nmap, it appears that the port is closed:

jrw@katana:~$ sudo nmap -Pn mark1.local  | sed 's/^/    /'

Starting Nmap 6.40 ( http://nmap.org ) at 2017-12-06 08:41 PST
Nmap scan report for mark1.local (10.199.4.191)
Host is up (0.00024s latency).
Not shown: 999 filtered ports
PORT   STATE  SERVICE
22/tcp closed ssh
MAC Address: B8:27:EB:56:C8:EC (Raspberry Pi Foundation)

Nmap done: 1 IP address (1 host up) scanned in 5.10 seconds

No router or other networking device in between the Mark 1 and the clients. Both the Linux and Windows client boxes are not only in the same IP subnet, but also on the same ethernet segment (just a little desktop 3com switch).

I decided to try a Reset (from the dial menu) and did the re-registration, and then re-enable SSH (and reboot). Alas, no difference; SSH still seems to be unavailable.


#6

Thanks so much for that information @jrwarwick.

The code that enables SSH is found at;

Is there any way that you’re able to connect the Mark 1 to a HDMI-based monitor with a USB keyboard and then run

systemctl enable ssh.service
then
systemctl start ssh.service

If not let me know and I’ll see what else we can do.

Kind regards,
Kathy


#7

That worked perfectly. A real console as a fallback: I really like that!
Thanks so much for your help, Kathy. At this point, I’d say “issue resolved,” but if you would like me copy off any logs for determination of cause of failure for the knob-interface to turn on SSH, I’d be happy to do so. Just let me know what file paths and where to deposit them.
:+1:


#8

Absolute pleasure, @jrwarwick, we’re here to help!

This is not a frequent error that we’ve seen - if we we see it again, or if it happens again we’ll get some logs, but for now I’m just very thankful of your willingness to assist us troubleshoot - thank you!


#9

Just got a new Mark1 and am having the same problem. Is the only known solution still jacking into the device directly?

Thanks!


#10

Hi there @Pair-o-twos sorry to hear you’re encountering this issue as well. Enabling ssh via the button on the Mark 1 should work, if it doesn’t then check the following:

  • that you can ping the Device on your network;
kathyreid@kathyreid-N76VZ:~$ ping 192.168.0.2
PING 192.168.0.2 (192.168.0.2) 56(84) bytes of data.
64 bytes from 192.168.0.2: icmp_seq=1 ttl=64 time=7.27 ms
64 bytes from 192.168.0.2: icmp_seq=2 ttl=64 time=5.54 ms
64 bytes from 192.168.0.2: icmp_seq=3 ttl=64 time=5.29 ms
  • That you don’t have any configurations on your router or switch that would block port 22

If the above two things are OK, and it won’t enable via the button then unfortunately the only way to enable SSH is to jack in directly and follow the instructions above :frowning:


#11

It is probably me! I googled for Mycroft SSH and found this thread, not realizing that A) documentation was provided for a reason, and B) it can be found online as well ( https://mycroft.ai/documentation/mark-1/ ). Long story short, I didn’t realize the button was a dial as well :blush:


#12

All good, the main thing is you’re up and working! :+1: