|
Lines 296-308
keygrab_ssh2(con *c)
Link Here
|
| 296 |
} |
296 |
} |
| 297 |
|
297 |
|
| 298 |
static void |
298 |
static void |
| 299 |
keyprint(con *c, struct sshkey *key) |
299 |
keyprint_one(char *host, struct sshkey *key) |
| 300 |
{ |
300 |
{ |
| 301 |
char *host = c->c_output_name ? c->c_output_name : c->c_name; |
301 |
char *hostport; |
| 302 |
char *hostport = NULL; |
|
|
| 303 |
|
302 |
|
| 304 |
if (!key) |
|
|
| 305 |
return; |
| 306 |
if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL) |
303 |
if (hash_hosts && (host = host_hash(host, NULL, 0)) == NULL) |
| 307 |
fatal("host_hash failed"); |
304 |
fatal("host_hash failed"); |
| 308 |
|
305 |
|
|
Lines 313-318
keyprint(con *c, struct sshkey *key)
Link Here
|
| 313 |
free(hostport); |
310 |
free(hostport); |
| 314 |
} |
311 |
} |
| 315 |
|
312 |
|
|
|
313 |
static void |
| 314 |
keyprint(con *c, struct sshkey *key) |
| 315 |
{ |
| 316 |
char *hosts = c->c_output_name ? c->c_output_name : c->c_name; |
| 317 |
char *host, *ohosts; |
| 318 |
|
| 319 |
if (!key) |
| 320 |
return; |
| 321 |
if (!hash_hosts && ssh_port == SSH_DEFAULT_PORT) { |
| 322 |
keyprint_one(hosts, key); |
| 323 |
return; |
| 324 |
} |
| 325 |
ohosts = hosts = xstrdup(hosts); |
| 326 |
while ((host = strsep(&hosts, ",")) != NULL) |
| 327 |
keyprint_one(host, key); |
| 328 |
free(ohosts); |
| 329 |
} |
| 330 |
|
| 316 |
static int |
331 |
static int |
| 317 |
tcpconnect(char *host) |
332 |
tcpconnect(char *host) |
| 318 |
{ |
333 |
{ |