install ssh server
docker run -itd --restart=always --privileged=true -p 8022:22 -v /home/user_name:/root --name sftp ubuntu:22.04
docker exec -it sftp
apt update
apt -y install openssh-server nano
allow root remote
nano /etc/ssh/sshd_config
PermitRootLogin yes
# StrictModes yes
# MaxAuthTries 6
# MaxSessions 10
start ssh server
passwd
service ssh start
exit
test
sftp -P 8002 root@x.x.x.x