1.0-beta
docker run -p 2222:22 -v /home/local_user/.ssh/id_rsa.pub:/root/.ssh/authorized_keys:ro -d --name=alpinesshcontainer aleksxp/alpinessh:latest
where:
Change local_user to your real local username to use it locally. Or you may create file named authorized_keys with desired keys (one key per row) and run container like this:
docker run -p 2222:22 -v /path/to/authorized_keys:/root/.ssh/authorized_keys:ro -d --name=alpinesshcontainer aleksxp/alpinessh:latest
After run you can connect to container:
ssh -p 2222 root@localhost
Alexander Lebedev [email protected]
Content type
Image
Digest
Size
4.6 MB
Last updated
over 10 years ago
docker pull aleksxp/alpinessh