Add debug output in child process to show the exact SSH command being executed

parent c52c2385
......@@ -420,7 +420,11 @@ int main(int argc, char *argv[]) {
if (pid == 0) {
// Child process: run SSH
if (config.debug) {
printf("[DEBUG - Tunnel] Child process starting SSH...\n");
printf("[DEBUG - Tunnel] Child process starting SSH with command:");
for (int i = 0; new_ssh_args[i]; i++) {
printf(" %s", new_ssh_args[i]);
}
printf("\n");
fflush(stdout);
}
execvp("ssh", new_ssh_args);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment