4

I have installed the Snappy Ubuntu Core alpha using KVM, but cannot connect to it using SSH.

SSH returns ssh_exchange_identification: read: Connection reset by peer, which seems like a server-side error on the image.

The host system is Ubuntu 14.10 Desktop.

Installation instructions: http://blog.dustinkirkland.com/2014/12/its-a-snap.html

$ sudo apt-get install kvm

$ kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

$ wget http://cdimage.ubuntu.com/ubuntu-core/preview/ubuntu-core-alpha-01.img

$ kvm -redir :2222::22 -redir :4443::443 ubuntu-core-alpha-01.img

The image seems to be running: The expected QEMU window opens, "Booting from disk...". A QEMU process starts to use CPU and MEM in top. QEMU begins listening on the appropriate ports:

$ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address State    PID/Program name
tcp        0      0 0.0.0.0:2222            0.0.0.0:*       LISTEN   11303/qemu-system-x
[...]
tcp        0      0 0.0.0.0:4443            0.0.0.0:*       LISTEN   11303/qemu-system-x
[...]
$

No firewall rules block ports 22, 443, 2222, or 4443 on the host:

$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination 

In a different terminal window, I try to ssh into the Snappy Ubuntu Core system:

$ ssh -vv -p 2222 ubuntu@localhost
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to localhost [127.0.0.1] port 2222.
debug1: Connection established.
debug1: identity file /home/ian/.ssh/id_rsa type 1
debug1: identity file /home/ian/.ssh/id_rsa-cert type -1
debug1: identity file /home/ian/.ssh/id_dsa type 2
debug1: identity file /home/ian/.ssh/id_dsa-cert type -1
debug1: identity file /home/ian/.ssh/id_ecdsa type -1
debug1: identity file /home/ian/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/ian/.ssh/id_ed25519 type -1
debug1: identity file /home/ian/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-8
ssh_exchange_identification: read: Connection reset by peer
$

Did I make a mistake? Or could this be a bug?

closed as off-topic by muru, Eric Carvalho, Elder Geek, αғsнιη, Volker Siegel Jan 6 '15 at 23:20

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Bug reports and problems specific to development version of Ubuntu should be reported on Launchpad so that developers can see, track and fix these issues." – muru, Eric Carvalho, Elder Geek, αғsнιη, Volker Siegel
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Problems with development versions are off-topic here, and Snappy definitely is still in preview. Perhaps either Unix & Linux or Launchpad? – muru Dec 11 '14 at 16:41
5

Thanks to the gurus in #snappy IRC, who figured it out.

First of all, the snappy image requires a 64-bit host. My host is running 32-bit, so QEMU could load the image, but couldn't run it. Currently, no 32-bit version of Snappy Ubuntu Core is built.

Had I been using a 64-bit host, a similar condition could occur if the KVM is stopped early, before or during ssh key generation. Two possible solutions: 1) Download a fresh image, or 2) login though the console (instead of ssh) and delete /etc/ssh/*host* files.

Not the answer you're looking for? Browse other questions tagged or ask your own question.