Hi All,
As shown below, I do have a lxc vm named v2, standard ubuntu 22.04 based with ip address assigned.
When I try to ssh into it from host-machine it fails saying Permission denied (publickey). Any suggestion would be of great help
$ lxc list
+-----------+---------+---------------------+-----------------------------------------------+-----------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+-----------+---------+---------------------+-----------------------------------------------+-----------------+-----------+
| ml01-vm | RUNNING | | | VIRTUAL-MACHINE | 0 |
+-----------+---------+---------------------+-----------------------------------------------+-----------------+-----------+
| v2 | RUNNING | 10.76.30.219 (eth0) | fd42:4aec:b51c:d679:216:3eff:fe23:ca5d (eth0) | VIRTUAL-MACHINE | 0 |
+-----------+---------+---------------------+-----------------------------------------------+-----------------+-----------+
ip@op1:~$
ip@op1:~$ ping 10.76.30.219
PING 10.76.30.219 (10.76.30.219) 56(84) bytes of data.
64 bytes from 10.76.30.219: icmp_seq=1 ttl=64 time=0.683 ms
64 bytes from 10.76.30.219: icmp_seq=2 ttl=64 time=0.310 ms
64 bytes from 10.76.30.219: icmp_seq=3 ttl=64 time=0.306 ms
^C
--- 10.76.30.219 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2051ms
rtt min/avg/max/mdev = 0.306/0.433/0.683/0.176 ms
ip@op1:~$ ssh ubuntu@10.76.30.219
ubuntu@10.76.30.219: Permission denied (publickey).
ip@op1:~$ lxc exec v2 -- sudo --user ubuntu --login
ubuntu@v2:~$
ubuntu@v2:~$ cat /etc/ssh/sshd_config | grep Password
PasswordAuthentication yes
#PermitEmptyPasswords no
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication