diff options
Diffstat (limited to 'libssh/options.c')
-rw-r--r-- | libssh/options.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libssh/options.c b/libssh/options.c index 160b87c..4fdd5dc 100644 --- a/libssh/options.c +++ b/libssh/options.c @@ -860,6 +860,13 @@ int ssh_options_apply(ssh_session session) { } } + if (session->username == NULL) { + rc = ssh_options_set(session, SSH_OPTIONS_USER, NULL); + if (rc < 0) { + return -1; + } + } + if (session->knownhosts == NULL) { tmp = ssh_path_expand_escape(session, "%d/known_hosts"); } else { |