=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sshconnect.c,v retrieving revision 1.346 retrieving revision 1.347 diff -u -r1.346 -r1.347 --- src/usr.bin/ssh/sshconnect.c 2020/12/20 23:36:51 1.346 +++ src/usr.bin/ssh/sshconnect.c 2020/12/20 23:38:00 1.347 @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect.c,v 1.346 2020/12/20 23:36:51 djm Exp $ */ +/* $OpenBSD: sshconnect.c,v 1.347 2020/12/20 23:38:00 djm Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -910,6 +910,10 @@ */ host_status = check_key_in_hostkeys(host_hostkeys, host_key, &host_found); + + /* If no host files were specified, then don't try to touch them */ + if (!readonly && num_user_hostfiles == 0) + readonly = RDONLY; /* * Also perform check for the ip address, skip the check if we are