Reputation: 401
I'm following one of the courses on Udemy about CI/CD, Jenkins, Docker, Ansible, etc. that was recommended in my company. It's quite good, but unfortunately a bit old, outdated and doesn't seem to be maintained by the author anymore.
I have a CentOS VM that is running Docker with 3 containers:
For the exercise I'm stuck with, the jenkins-host has ansible installed and then use it to:
All the connections are configured to use ssh key authentication and are working perfectly fine when I do it manually from a command line. Also pinging works as expected. However, when ansible comes into play everyhting takes a lot of time to execute. Both 'ansible' and 'ansible-playbook' commands are stuck for couple of minutes until completed successfully. Tried many solutions found in different places (thus current shape of .ansible.cfg file), but none seems to help.
My .ansible.cfg:
jenkins@2230a9d85613:~/ansible$ cat ../.ansible.cfg
[defaults]
remote_tmp = /tmp/.ansible-${USER}/tmp
host_key_checking = False
[ssh_connection]
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s
control_path = /dev/shm/cp%%h-%%p-%%r
My hosts inventory:
jenkins@2230a9d85613:~/ansible$ cat hosts
[all:vars]
ansible_connection = ssh
[test]
test1 ansible_host=remote_host ansible_user=remote_user ansible_private_key_file=/var/jenkins_home/ansible/remote-key
When I try to ping the remote_host from jenkins_host via ansible command:
jenkins@2230a9d85613:~/ansible$ ansible -i hosts -m ping test1 -vvv
ansible [core 2.14.18]
config file = /var/jenkins_home/.ansible.cfg
configured module search path = ['/var/jenkins_home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /var/jenkins_home/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible
python version = 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
Using /var/jenkins_home/.ansible.cfg as config file
host_list declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
script declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
Parsed /var/jenkins_home/ansible/hosts inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /tmp/.ansible-${USER}/tmp `"&& mkdir "` echo /tmp/.ansible-${USER}/tmp/ansible-tmp-1740598541.43972-32216-106490552436813 `" && echo ansible-tmp-1740598541.43972-32216-106490552436813="` echo /tmp/.ansible-${USER}/tmp/ansible-tmp-1740598541.43972-32216-106490552436813 `" ) && sleep 0'"'"''
<remote_host> (0, b'ansible-tmp-1740598541.43972-32216-106490552436813=/tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813\n', b'')
<test1> Attempting python interpreter discovery
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'echo PLATFORM; uname; echo FOUND; command -v '"'"'"'"'"'"'"'"'python3.11'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.10'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.9'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.8'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/libexec/platform-python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
<remote_host> (0, b'PLATFORM\nLinux\nFOUND\n/usr/libexec/platform-python\n/usr/bin/python2.7\n/usr/bin/python\n/usr/bin/python\nENDFOUND\n', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'/usr/libexec/platform-python && sleep 0'"'"''
<remote_host> (0, b'{"osrelease_content": "NAME=\\"CentOS Linux\\"\\nVERSION=\\"7 (Core)\\"\\nID=\\"centos\\"\\nID_LIKE=\\"rhel fedora\\"\\nVERSION_ID=\\"7\\"\\nPRETTY_NAME=\\"CentOS Linux 7 (Core)\\"\\nANSI_COLOR=\\"0;31\\"\\nCPE_NAME=\\"cpe:/o:centos:centos:7\\"\\nHOME_URL=\\"https://www.centos.org/\\"\\nBUG_REPORT_URL=\\"https://bugs.centos.org/\\"\\n\\nCENTOS_MANTISBT_PROJECT=\\"CentOS-7\\"\\nCENTOS_MANTISBT_PROJECT_VERSION=\\"7\\"\\nREDHAT_SUPPORT_PRODUCT=\\"centos\\"\\nREDHAT_SUPPORT_PRODUCT_VERSION=\\"7\\"\\n\\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}\n', b'')
Using module file /usr/lib/python3/dist-packages/ansible/modules/ping.py
<remote_host> PUT /var/jenkins_home/.ansible/tmp/ansible-local-32212auuc9qya/tmphb7ecy9p TO /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/AnsiballZ_ping.py
<remote_host> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' '[remote_host]'
<remote_host> (0, b'sftp> put /var/jenkins_home/.ansible/tmp/ansible-local-32212auuc9qya/tmphb7ecy9p /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/AnsiballZ_ping.py\n', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'chmod u+x /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/ /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/AnsiballZ_ping.py && sleep 0'"'"''
<remote_host> (0, b'', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' -tt remote_host '/bin/sh -c '"'"'/usr/bin/python /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/AnsiballZ_ping.py && sleep 0'"'"''
At this point nothing happens. Execution is stopped for exactly 6 minutes. And then the ansible command is completed successfully.
<remote_host> (0, b'\r\n{"invocation": {"module_args": {"data": "pong"}}, "ping": "pong"}\r\n', b'Shared connection to remote_host closed.\r\n')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'rm -f -r /tmp/.ansible-remote_user/tmp/ansible-tmp-1740598541.43972-32216-106490552436813/ > /dev/null 2>&1 && sleep 0'"'"''
<remote_host> (0, b'', b'')
test1 | SUCCESS => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": false,
"invocation": {
"module_args": {
"data": "pong"
}
},
"ping": "pong"
}
Second exercise was to execute the following playbook in order to connect to the remote-host and execute shell command.
jenkins@2230a9d85613:~/ansible$ cat play.yml
- hosts: test1
gather_facts: false
tasks:
- shell: echo Hello World! > /tmp/ansible-file
Playbook execution:
jenkins@2230a9d85613:~/ansible$ ansible-playbook -i hosts play.yml -vvv
ansible-playbook [core 2.14.18]
config file = /var/jenkins_home/.ansible.cfg
configured module search path = ['/var/jenkins_home/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python3/dist-packages/ansible
ansible collection location = /var/jenkins_home/.ansible/collections:/usr/share/ansible/collections
executable location = /usr/bin/ansible-playbook
python version = 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] (/usr/bin/python3)
jinja version = 3.1.2
libyaml = True
Using /var/jenkins_home/.ansible.cfg as config file
host_list declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
script declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
auto declined parsing /var/jenkins_home/ansible/hosts as it did not pass its verify_file() method
Parsed /var/jenkins_home/ansible/hosts inventory source with ini plugin
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
PLAYBOOK: play.yml *************************************************************************************************************
1 plays in play.yml
PLAY [test1] *******************************************************************************************************************
TASK [shell] *******************************************************************************************************************
task path: /var/jenkins_home/ansible/play.yml:4
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'( umask 77 && mkdir -p "` echo /tmp/.ansible-${USER}/tmp `"&& mkdir "` echo /tmp/.ansible-${USER}/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900 `" && echo ansible-tmp-1740599213.1409082-32286-53072790886900="` echo /tmp/.ansible-${USER}/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900 `" ) && sleep 0'"'"''
<remote_host> (0, b'ansible-tmp-1740599213.1409082-32286-53072790886900=/tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900\n', b'')
<test1> Attempting python interpreter discovery
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'echo PLATFORM; uname; echo FOUND; command -v '"'"'"'"'"'"'"'"'python3.11'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.10'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.9'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.8'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.6'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python3.5'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python3'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/libexec/platform-python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python2.7'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'/usr/bin/python'"'"'"'"'"'"'"'"'; command -v '"'"'"'"'"'"'"'"'python'"'"'"'"'"'"'"'"'; echo ENDFOUND && sleep 0'"'"''
<remote_host> (0, b'PLATFORM\nLinux\nFOUND\n/usr/libexec/platform-python\n/usr/bin/python2.7\n/usr/bin/python\n/usr/bin/python\nENDFOUND\n', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'/usr/libexec/platform-python && sleep 0'"'"''
<remote_host> (0, b'{"osrelease_content": "NAME=\\"CentOS Linux\\"\\nVERSION=\\"7 (Core)\\"\\nID=\\"centos\\"\\nID_LIKE=\\"rhel fedora\\"\\nVERSION_ID=\\"7\\"\\nPRETTY_NAME=\\"CentOS Linux 7 (Core)\\"\\nANSI_COLOR=\\"0;31\\"\\nCPE_NAME=\\"cpe:/o:centos:centos:7\\"\\nHOME_URL=\\"https://www.centos.org/\\"\\nBUG_REPORT_URL=\\"https://bugs.centos.org/\\"\\n\\nCENTOS_MANTISBT_PROJECT=\\"CentOS-7\\"\\nCENTOS_MANTISBT_PROJECT_VERSION=\\"7\\"\\nREDHAT_SUPPORT_PRODUCT=\\"centos\\"\\nREDHAT_SUPPORT_PRODUCT_VERSION=\\"7\\"\\n\\n", "platform_dist_result": ["centos", "7.9.2009", "Core"]}\n', b'')
Using module file /usr/lib/python3/dist-packages/ansible/modules/command.py
<remote_host> PUT /var/jenkins_home/.ansible/tmp/ansible-local-32282x65ftqn7/tmptxd5y6fe TO /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/AnsiballZ_command.py
<remote_host> SSH: EXEC sftp -b - -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' '[remote_host]'
<remote_host> (0, b'sftp> put /var/jenkins_home/.ansible/tmp/ansible-local-32282x65ftqn7/tmptxd5y6fe /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/AnsiballZ_command.py\n', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'chmod u+x /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/ /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/AnsiballZ_command.py && sleep 0'"'"''
<remote_host> (0, b'', b'')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' -tt remote_host '/bin/sh -c '"'"'/usr/bin/python /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/AnsiballZ_command.py && sleep 0'"'"''
Again, at this stage execution is halted. This time after about 12 minutes playbook continues:
<remote_host> (0, b'\r\n{"changed": true, "end": "2025-02-26 19:59:04.355336", "stdout": "", "cmd": "echo Hello World! > /tmp/ansible-file", "start": "2025-02-26 19:52:58.688657", "delta": "0:06:05.666679", "stderr": "", "rc": 0, "invocation": {"module_args": {"executable": null, "_uses_shell": true, "strip_empty_ends": true, "_raw_params": "echo Hello World! > /tmp/ansible-file", "removes": null, "argv": null, "creates": null, "chdir": null, "stdin_add_newline": true, "stdin": null}}, "msg": ""}\r\n', b'Shared connection to remote_host closed.\r\n')
<remote_host> ESTABLISH SSH CONNECTION FOR USER: remote_user
<remote_host> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o 'IdentityFile="/var/jenkins_home/ansible/remote-key"' -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o 'User="remote_user"' -o ConnectTimeout=10 -o 'ControlPath="/dev/shm/cp%h-%p-%r"' remote_host '/bin/sh -c '"'"'rm -f -r /tmp/.ansible-remote_user/tmp/ansible-tmp-1740599213.1409082-32286-53072790886900/ > /dev/null 2>&1 && sleep 0'"'"''
<remote_host> (0, b'', b'')
changed: [test1] => {
"ansible_facts": {
"discovered_interpreter_python": "/usr/bin/python"
},
"changed": true,
"cmd": "echo Hello World! > /tmp/ansible-file",
"delta": "0:06:05.666679",
"end": "2025-02-26 19:59:04.355336",
"invocation": {
"module_args": {
"_raw_params": "echo Hello World! > /tmp/ansible-file",
"_uses_shell": true,
"argv": null,
"chdir": null,
"creates": null,
"executable": null,
"removes": null,
"stdin": null,
"stdin_add_newline": true,
"strip_empty_ends": true
}
},
"msg": "",
"rc": 0,
"start": "2025-02-26 19:52:58.688657",
"stderr": "",
"stderr_lines": [],
"stdout": "",
"stdout_lines": []
}
PLAY RECAP *********************************************************************************************************************
test1 : ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
On top of that I can hear that my PC hosting the VM that is running Docker containers is working hard at the time visibly nothing happens during ssh connection attempt. It's a small Intel NUC that I hardly ever hear running, but this time its fans are running crazy during these couple of minutes.
Upvotes: 1
Views: 56
Reputation: 19123
In SSHD config file, you need to disable the DNS lookup and restart the sshd process. this resolve the slowness issue.
Upvotes: -2