我有一个新创建的centos7。我安装了LXC并创建了一个配置:
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.hwaddr = fe:84:8b:f1:76:8e
lxc.network.flags = up
lxc.rootfs = /var/lib/lxc/lon-staging-nginx1.web.com/rootfs
lxc.include = /usr/share/lxc/config/centos.common.conf
lxc.arch = x86_64
lxc.utsname = lon-staging-nginx1.web.com
lxc.network.ipv4 = 192.168.42.110/24
lxc.network.ipv4.gateway = 192.168.42.1
lxc.mount.entry = /root/staging-test vagrant/ none bind 0 0
lxc.mount.entry = /srv/www/cdn srv/www/cdn/ none bind 0 0
lxc.mount.entry = /srv/www/main-application/app srv/www/web/ none bind 0 0
我启动它,并且可以毫无问题地从主机 ping 它。我可以毫无问题地从主机到其他虚拟机进行 SSH。SoftLayer 上的虚拟机和虚拟机之间的 SSH 正在运行。当我想通过 SSH 连接到容器时,我尝试这样做:
ssh -vvvv [email protected]
我尝试过UseDNS 否和GSSAPI身份验证否但这些对我没有帮助。此位置的连接状态:
...
debug3: load_hostkeys: loading entries for host "192.168.42.110" from file "/root/.ssh/known_hosts"
debug3: load_hostkeys: found key type ECDSA in file /root/.ssh/known_hosts:2
debug3: load_hostkeys: loaded 1 keys
debug1: Host '192.168.42.110' is known and matches the ECDSA host key.
debug1: Found key in /root/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /root/.ssh/id_rsa (0x7fce34aff920),
debug2: key: /root/.ssh/id_dsa ((nil)),
debug2: key: /root/.ssh/id_ecdsa ((nil)),
debug2: key: /root/.ssh/id_ed25519 ((nil)),
经过很长一段时间才开始使用它:
debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug3: send_pubkey_test
我看了看时间 ssh ...命令和尝试时间是
real 5m27.966s
user 0m0.021s
sys 0m0.001s