mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Been meaning to do this for years: introduce a configuration option
to manually tweak the host name and port number under which the SSH host key is read and written. I've put it in the cross-platform Connection panel. Partly under the flimsy pretext that other backends _can_ use it if they so wish (and in fact it overrides the host name for title-bar purposes in all network backends, though it has no other effect in anything but SSH); but mostly because the SSH panel was too full already :-) [originally from svn r8033]
This commit is contained in:
16
raw.c
16
raw.c
@ -139,6 +139,22 @@ static const char *raw_init(void *frontend_handle, void **backend_handle,
|
||||
if ((err = sk_socket_error(raw->s)) != NULL)
|
||||
return err;
|
||||
|
||||
if (*cfg->loghost) {
|
||||
char *colon;
|
||||
|
||||
sfree(*realhost);
|
||||
*realhost = dupstr(cfg->loghost);
|
||||
colon = strrchr(*realhost, ':');
|
||||
if (colon) {
|
||||
/*
|
||||
* FIXME: if we ever update this aspect of ssh.c for
|
||||
* IPv6 literal management, this should change in line
|
||||
* with it.
|
||||
*/
|
||||
*colon++ = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user