How to connect the lxd container using ssh
井民全, Jing, mqjing@gmail.com
Quick
lxc list # get your container list lxc exec ubuntu-container -- apt-get install openssh-server
# verify ssh ubuntu@10.199.76.115 lxc exec ubuntu-container -- passwd ubuntu # in case you forgot the passswd |
Procedure
Step 1: Get the container list to know your container's name, ip
lxc list # get your container list |
E.g.
Step 2: Install openssh server
lxc exec ubuntu-container -- apt-get install openssh-server |
E.g.
Verification
Note: If you forget the container user ubuntu's passwd, follow the instruction to change it.
lxc exec ubuntu-container -- passwd ubuntu |