# attach containerpodmanexec-it wechar_build2 bash# install ssh package and generate ssh keyapt update &&aptinstall openssh-server && ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N''# generate ssh public key to be used in such as git
ssh-keygen -q-t rsa -N''-f ~/.ssh/id_rsa# change the Port in /etc/ssh/sshd_configecho Port 3368>> /etc/ssh/sshd_config
# startup sshdservicessh start
# To debug the sshd, you can run cmd: /usr/sbin/sshd -p3368 -D -d -e# add your local public key (~/.ssh/id_rsa.pub) to container ~/.ssh/authorized_keys # to support ssh login through ssh keyvim ~/.ssh/authorized_keys