Dieses Blog durchsuchen

Montag, 5. September 2016

docker: make container accessable via ssh with username / password

Normaly the containers are not accessable via ssh with username and password.

This hack will aktivate ssh for root via the container ip with username and password

Login via docker inspect <container> bash
export TERM=xterm 
nano /etc/ssh/sshd_config

PermitRootLogin without-password
change to
PermitRootLogin yes
sudo apt-get --reinstall install openssh-server openssh-client
service ssh restart
 
passwd root 
 
Type in your password.

After that you can access the container via IP and username / password








Keine Kommentare:

Kommentar veröffentlichen