Question
Connect Droplet via SSH is Unstable. Encounter "timed out" occasionally.
Hi,
I created a docker droplet recently and try to create a generic docker-machine in my windows workspace.
However, I cannot successfully create the docker-machine. After debugging, I found out that I cannot successfully connect to my droplet with SSH every time.
Below is my command to create docker-machine:
docker-machine -D --native-ssh create --driver generic --generic-ip-address=<IP> --generic-ssh-key <RSA KEY> remote
The command stuck when running SSH command, below is partial log:
About to run SSH command:
sudo hostname docker && echo "docker" | sudo tee /etc/hostname
SSH cmd err, output: <nil>:
(docker) Calling .GetSSHHostname
(docker) Calling .GetSSHPort
(docker) Calling .GetSSHKeyPath
(docker) Calling .GetSSHKeyPath
(docker) Calling .GetSSHUsername
Using SSH client type: native
&{{{<nil> 0 [] [] []} root [0x76ed50] 0x76ed00 [] 0s} 167.71.214.248 22 <nil> <nil>}
About to run SSH command:
if ! grep -xq '.*\sdocker' /etc/hosts; then
if grep -xq '127.0.1.1\s.*' /etc/hosts; then
sudo sed -i 's/^127.0.1.1\s.*/127.0.1.1 docker/g' /etc/hosts;
else
echo '127.0.1.1 docker' | sudo tee -a /etc/hosts;
fi
fi
Error dialing TCP: dial tcp 167.71.214.248:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error dialing TCP: dial tcp 167.71.214.248:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error dialing TCP: dial tcp 167.71.214.248:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error dialing TCP: dial tcp 167.71.214.248:22: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I try to connect to my droplet with below command:
ssh root@167.71.214.248 echo hi
The command cannot always run successfully. Below is my screenshot:
I’m wondering what’s going wrong? Please kindly help me. Thanks a lot.
Reference
Droplet Info
Docker machine version:
docker-machine.exe version 0.14.0, build 89b8332
I have tried version 0.12 ~ 0.16, but still encounter the same error
My computer
- Window 10 Home Edition
- Have tried both OpenSSH and SSH in Docker Quick Start terminal
- Using DockerTools
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×