ssh_config icon indicating copy to clipboard operation
ssh_config copied to clipboard

Creating `Host` with `StrictHostKeyChecking': False,` will not register

Open N-Demir opened this issue 5 months ago • 0 comments

For example:

new_host_entry = Host(hostname, {
    'HostName': new_host,
    'Port': int(new_port),
    'User': 'root',
    'StrictHostKeyChecking': False,
})

will fail because in client.py in the init for Host if attrs.get(keyword.key.upper()): will return False and thus not properly register. I think you want to change it to:

if attrs.get(keyword.key.upper()) is not None to actually properly check if the value was set by the user?

I guess this is the tough thing about accepting bools or strs for that field.... :)

N-Demir avatar Aug 12 '25 23:08 N-Demir