### Summary

When using paramiko and when doing a reboot then ansible will fail with "Failed to open session: SSH session not active". The target host is rebooted but ansible exits with error message.

Using ansible-base 2.10.4 the reboot works. Using 2.10.5rc1 or newer the reboot does not work.

Bug was caused by this PR https://github.com/ansible/ansible/pull/72688

Commenting out the lines 

        if not self._connected:
            return

from lib/ansible/plugins/connection/paramiko_ssh.py fixes the reboot.


### Issue Type

Bug Report

### Component Name

paramiko

### Ansible Version

```console (paste below)
$ ansible --version
ansible [core 2.11.0b4.post0]
  config file = /Users/kimmo/projects/ansible_bug/ansible.cfg
  configured module search path = ['/Users/kimmo/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/kimmo/Library/Caches/pypoetry/virtualenvs/ansible-bug-RRBfm9wT-py3.9/lib/python3.9/site-packages/ansible
  ansible collection location = /Users/kimmo/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/kimmo/Library/Caches/pypoetry/virtualenvs/ansible-bug-RRBfm9wT-py3.9/bin/ansible
  python version = 3.9.2 (default, Mar 25 2021, 14:36:23) [Clang 12.0.0 (clang-1200.0.32.29)]
  jinja version = 2.11.3
  libyaml = True
```


### Configuration

```console (paste below)
$ ansible-config dump --only-changed
DEFAULT_HOST_LIST(/Users/kimmo/projects/ansible_bug/ansible.cfg) = ['/Users/kimmo/projects/ansible_bug/hosts.ini']
DEFAULT_REMOTE_USER(/Users/kimmo/projects/ansible_bug/ansible.cfg) = root
DEFAULT_TRANSPORT(/Users/kimmo/projects/ansible_bug/ansible.cfg) = paramiko
DEFAULT_VAULT_PASSWORD_FILE(env: ANSIBLE_VAULT_PASSWORD_FILE) = /Users/kimmo/ansible-vault.pass
DISPLAY_SKIPPED_HOSTS(env: ANSIBLE_DISPLAY_SKIPPED_HOSTS) = False
```


### OS / Environment

Target: debian 10

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
# Playbook:
- name: Reboot
  hosts: all
  tasks:
    - name: Reboot
      reboot:

```


### Expected Results

I expect target host to reboot and ansible to return success.

### Actual Results

Target host is rebooted but ansible reports failure.

```console (paste below)
PLAY [Reboot] **************************************************************************************************************************************************************************************************

TASK [Reboot] **************************************************************************************************************************************************************************************************
fatal: [test.example.com]: FAILED! => {"msg": "Failed to open session: SSH session not active"}

NO MORE HOSTS LEFT *********************************************************************************************************************************************************************************************

PLAY RECAP *****************************************************************************************************************************************************************************************************
test.example.com         : ok=1    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0
```

self.ssh._host_keys.update(self.ssh._system_host_keys)
                
                
                key_dir = os.path.dirname(self.keyfile)
                if os.path.exists(self.keyfile):
                    key_stat = os.stat(self.keyfile)
                    mode = key_stat.st_mode
                    uid = key_stat.st_uid
                    gid = key_stat.st_gid
                else:
                    mode = 33188
                    uid = os.getuid()
                    gid = os.getgid()
                
                
                
                tmp_keyfile = tempfile.NamedTemporaryFile(dir=key_dir, delete=False)
                os.chmod(tmp_keyfile.name, mode & 0o7777)
                os.chown(tmp_keyfile.name, uid, gid)
                self._save_ssh_host_keys(tmp_keyfile.name)
                tmp_keyfile.close()
                os.rename(tmp_keyfile.name, self.keyfile)
            except Exception:
                
                
                traceback.print_exc()
            fcntl.lockf(KEY_LOCK, fcntl.LOCK_UN)
        self.ssh.close()
        self._connected = False