1
0
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:
Simon Tatham
2008-06-01 11:16:32 +00:00
parent 33bfb2bc72
commit e81a8cf795
12 changed files with 175 additions and 5 deletions

16
raw.c
View File

@ -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;
}