在docker里面,一个容器ssh访问另一个容器(master),ssh: connect to host master port 22: Connection refused lost connection
我已经用命令来安装openssh-server,
apt-get install openssh-server
试了好久
端口一直被占用,vi /etc/ssh/sshd_config 把端口改为2222后
scp -P 2222 ~/.ssh/id_rsa.pub master:~/.ssh/id_rsa.pub.slave1
成功