Suddenly cannot ssh/scp to Ubuntu 14.04 container

I’ve been working for a couple of days on this container (ubuntu1404).

Today, before scp to container “ubuntu1404”, I install new two images/containers(Ubuntu 14.04) and succesfully scp to those containers. But, suddenly, I cannot ssh/scp to “ubuntu1404”. Last friday, I still can scp new file. I don’t know how to debug. No info on container’s /var/log/auth.log

$ telnet 10.207.109.35 22
Trying 10.207.109.35...
Connected to 10.207.109.35.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13
^]
telnet> quit

$ ssh -l system2023 10.207.109.35
Connection closed by 10.207.109.35 port 22

$ scp ripgrep_13.0.0_amd64.deb  system2023@10.207.109.35:Downloads/
Connection closed by 10.207.109.35 port 22
lost connection

$ lxc config show ubuntu1404 --expanded
architecture: x86_64
config:
  image.architecture: amd64
  image.description: ubuntu 14.04 LTS amd64 (release) (20191107)
  image.label: release
  image.os: ubuntu
  image.release: trusty
  image.serial: "20191107"
  image.type: root.tar.xz
  image.version: "14.04"
  volatile.base_image: 97ca81741254148eae6a20e1d8f087d90a2bbf1b6c6116459bcdbe5dc5148ce3
  volatile.cloud-init.instance-id: 61f204e2-d795-4e22-aff9-786887bb7372
  volatile.eth0.host_name: veth596a9252
  volatile.eth0.hwaddr: 00:16:3e:e1:95:6d
  volatile.idmap.base: "0"
  volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.power: RUNNING
  volatile.last_state.ready: "false"
  volatile.uuid: f8441e36-95a6-4d0f-a434-54b65f99ab5b
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

ssh:

$ ssh -v -l system2023  10.207.109.35
OpenSSH_8.9p1 Ubuntu-3ubuntu0.1, OpenSSL 3.0.2 15 Mar 2022
debug1: Reading configuration data /home/jaya/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 10.207.109.35 [10.207.109.35] port 22.
debug1: Connection established.
debug1: identity file /home/jaya/.ssh/id_rsa type 0
debug1: identity file /home/jaya/.ssh/id_rsa-cert type -1
debug1: identity file /home/jaya/.ssh/id_ecdsa type 2
debug1: identity file /home/jaya/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/jaya/.ssh/id_ecdsa_sk type -1
debug1: identity file /home/jaya/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /home/jaya/.ssh/id_ed25519 type -1
debug1: identity file /home/jaya/.ssh/id_ed25519-cert type -1
debug1: identity file /home/jaya/.ssh/id_ed25519_sk type -1
debug1: identity file /home/jaya/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /home/jaya/.ssh/id_xmss type -1
debug1: identity file /home/jaya/.ssh/id_xmss-cert type -1
debug1: identity file /home/jaya/.ssh/id_dsa type -1
debug1: identity file /home/jaya/.ssh/id_dsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.9p1 Ubuntu-3ubuntu0.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13
debug1: compat_banner: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.13 pat OpenSSH_6.6.1* compat 0x04000002
debug1: Authenticating to 10.207.109.35:22 as 'system2023'
debug1: load_hostkeys: fopen /home/jaya/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-ed25519
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: SSH2_MSG_KEX_ECDH_REPLY received
debug1: Server host key: ssh-ed25519 SHA256:CXxG5NKF3DG5ocKDa1d/UDHf2EczLA3LGLD1Y64bNJ4
debug1: load_hostkeys: fopen /home/jaya/.ssh/known_hosts2: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts: No such file or directory
debug1: load_hostkeys: fopen /etc/ssh/ssh_known_hosts2: No such file or directory
debug1: Host '10.207.109.35' is known and matches the ED25519 host key.
debug1: Found key in /home/jaya/.ssh/known_hosts:68
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/jaya/.ssh/id_rsa RSA SHA256:JgQyJaSJZq+wWJS6gQcuhUKE4/ykFdERBHU16CPZtFo
debug1: Will attempt key: /home/jaya/.ssh/id_ecdsa ECDSA SHA256:t/ALsMzyWRyBPxr7NloXyyZZtpVmWD46GU8v0F2nfxw
debug1: Will attempt key: /home/jaya/.ssh/id_ecdsa_sk
debug1: Will attempt key: /home/jaya/.ssh/id_ed25519
debug1: Will attempt key: /home/jaya/.ssh/id_ed25519_sk
debug1: Will attempt key: /home/jaya/.ssh/id_xmss
debug1: Will attempt key: /home/jaya/.ssh/id_dsa
debug1: SSH2_MSG_SERVICE_ACCEPT received
Connection closed by 10.207.109.35 port 22

LXD version 5.8-bb9c9b1. Access Web Server from host to container is normal too.

Hi @gwijayas, I wonder how to install Ubuntu14.04? I have just found 16.04 from the lxd container repositories.
Regards.

I run command like

lxc launch ubuntu:14.04 ubuntu1404ct

The name of container is ubuntu1404ct

I have tested ssh with ubuntu 14.04 and it works, I have just changed the line PasswordAuthentication no to yes in /etc/ssh/sshd_config.
Regards.

I did mention that I can’t ssh/scp after install 2 images of Ubuntu 14.04 (and can ssh/scp to these new containers from host). Lst week I can using pubkey method. But I’ve tried password method, still can’t using ssh from host. I can’t ssh from other container to “ubuntu1404” too. But, I can ssh between other container/host to other container