无法通过SSH连接到Snappy Ubuntu Core

用户535733

我已经使用KVM安装了Snappy Ubuntu Core Alpha,但是无法使用SSH连接到它。

SSH返回ssh_exchange_identification: read: Connection reset by peer,这似乎是映像上的服务器端错误。

主机系统是Ubuntu 14.10 Desktop。

安装说明: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

该映像似乎正在运行:预期的QEMU窗口打开,“正在从磁盘引导...”。QEMU进程开始首先使用CPU和MEM。QEMU开始在适当的端口上侦听:

$ 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
[...]
$

没有防火墙规则会阻止主机上的端口22、443、2222或4443:

$ 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 

在另一个终端窗口中,我尝试ssh进入Snappy Ubuntu Core系统:

$ 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
$

我做错了吗?还是这可能是一个错误?

用户535733

感谢#snappy IRC中的专家,他找到了答案。

首先,快照映像需要64位主机。我的主机正在运行32位,因此QEMU可以加载映像,但无法运行。当前,尚未构建Snappy Ubuntu Core的32位版本。

如果我一直在使用64位主机,则在ssh密钥生成之前,期间或期间停止KVM时,可能会发生类似情况。两种可能的解决方案:1)下载新映像,或2)通过控制台登录(而不是ssh)并删除/etc/ssh/*host*文件。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法通过LAN外部的SSH连接到我的个人Ubuntu服务器

无法连接到Firebird(Ubuntu)

在Ubuntu / Visual Studio Code上从.Net Core连接到SqlServer

外部通过SSH连接到Ubuntu服务器

无法使用SSH连接到Azure中的ubuntu映像

为什么无法从主机通过Telnet或SSH连接到VMWare guest虚拟机ubuntu?

什么是Snappy Ubuntu Core?

无法通过SSH远程连接到Ubuntu14.04服务器

如何从OSX通过SSH连接到Ubuntu服务器?

无法通过SSH连接到Ubuntu Touch设备

Ubuntu-Core Snappy SSL证书错误

无法从ubuntu连接到eduroam

从Ubuntu VM到Snappy Ubuntu Core VM的连接被拒绝

如何通过SSH远程连接到Ubuntu PC

无法使用ssh从android连接到ubuntu 14.04

Ubuntu Core Snappy映像在哪里?

在没有互联网连接的情况下更新ubuntu-core snappy

服务器升级到ubuntu 16.04后,mysql workbench无法通过ssh隧道连接到服务器

Ubuntu CORE SSH密钥

在Ubuntu Snappy Core上安装curl命令

Raspberry Pi ssh上的Ubuntu Core失败

在Ubuntu中通过SSH电缆通过SSH连接到Pi的问题

无法通过 SSH 从主机 Mac OS 连接到来宾 Ubuntu:主机已关闭

我无法使用新创建的用户和密钥对通过 ssh 连接到我的 Amazon AWS Ubuntu 实例?

在 Snappy Ubuntu Core 上的 ufw/iptables 中意外拒绝 ssh 后无法进行 SSH 访问

通过串行电缆连接到带有 Ubuntu Core 18 的 Raspberry Pi 4

无法通过 VNC 连接到 Ubuntu/Lubuntu(灰屏)

在 ubuntu-core 上通过互联网连接到 SSH

无法使用 SSH 从 iOS 连接到 Ubuntu 20.04