无法ssh到cirros的解决办法
cirros-0.5.2-x86_64-disk.img
现象:
[root@kvm ~]# ssh -v cirros@192.168.1.5
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
...
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha2-256 compression: none
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: kex: curve25519-sha256 need=32 dh_need=32
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
Connection closed by 192.168.1.5 port 22
原因:
ssh软件dropbear的配置目录不存在,无法创建相关文件,导致无法对外提供ssh服务。
其实在cirros启动时就报了 /etc/dropbear 目录不存在。
解决办法:
rm -f /etc/dropbear
mkdir -p /etc/dropbear
阅读(1231) | 评论(0) | 转发(0) |