1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-12 08:43:53 -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

View File

@ -805,6 +805,25 @@ static const char *telnet_init(void *frontend_handle, void **backend_handle,
*/
update_specials_menu(telnet->frontend);
/*
* loghost overrides realhost, if specified.
*/
if (*telnet->cfg.loghost) {
char *colon;
sfree(*realhost);
*realhost = dupstr(telnet->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;
}