/[LeafOK_CVS]/lbbs/src/test_ssh_server.c
ViewVC logotype

Diff of /lbbs/src/test_ssh_server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.19 by sysadm, Fri Dec 19 06:16:27 2025 UTC Revision 1.21 by sysadm, Sat Jan 3 10:27:14 2026 UTC
# Line 3  Line 3 
3   * test_ssh_server   * test_ssh_server
4   *   - tester for network server with SSH support   *   - tester for network server with SSH support
5   *   *
6   * Copyright (C) 2004-2025  Leaflet <leaflet@leafok.com>   * Copyright (C) 2004-2026  Leaflet <leaflet@leafok.com>
7   */   */
8    
9  // This test was written based on libssh example/proxy.c  // This test was written based on libssh example/proxy.c
# Line 240  int ssh_server(const char *hostaddr, uns Line 240  int ssh_server(const char *hostaddr, uns
240                                          _exit(1);                                          _exit(1);
241                                  }                                  }
242    
243                                  snprintf(buf, sizeof(buf), "Hello, welcome to the Sample SSH proxy.\r\nPlease select your destination: ");                                  snprintf(buf, sizeof(buf), "Hello, welcome to the Sample SSH proxy.\nPlease select your destination: ");
244                                  ssh_channel_write(SSH_channel, buf, (uint32_t)strlen(buf));                                  ssh_channel_write(SSH_channel, buf, (uint32_t)strlen(buf));
245                                  do                                  do
246                                  {                                  {
# Line 265  int ssh_server(const char *hostaddr, uns Line 265  int ssh_server(const char *hostaddr, uns
265                                                  _exit(1);                                                  _exit(1);
266                                          }                                          }
267                                  } while (i > 0);                                  } while (i > 0);
268                                  snprintf(buf, sizeof(buf), "Trying to connect to \"%s\"\r\n", host);                                  snprintf(buf, sizeof(buf), "Trying to connect to \"%s\"\n", host);
269                                  ssh_channel_write(SSH_channel, buf, (uint32_t)strlen(buf));                                  ssh_channel_write(SSH_channel, buf, (uint32_t)strlen(buf));
270                                  log_common("%s", buf);                                  log_common("%s", buf);
271    


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1