Source code of file sleepshell.c
from the Sleep Dummy Shell.

 /*
 
 #include <unistd.h>
 #include <stdio.h>
 #include <stdlib.h>
 
 #define SS_SLEEPTIME 10
 
 main() {
10   char *ssh_connection;
11   char *ssh_client;
12   char *ssh_tty;
13   
14   ssh_connection = getenv ("SSH_CONNECTION");
15   ssh_client = getenv ("SSH_CLIENT");
16   ssh_tty = getenv ("SSH_TTY");
17   printf ("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
18   if (ssh_connection && ssh_client) {
19     printf ("Connection: %s\nClient: %s\nTerminal: %s\n\n", ssh_connection, ssh_client, ssh_tty);
20   }
21   while (1) {
22     sleep (SS_SLEEPTIME);
23     printf ("*");
24     fflush (NULL);
25   }
26 }
27 
28 
 
 
NA fum/lmd: 2004.09.16
Copyright ©1994-2017 by Mario A. Valdez-Ramírez.
no siga este enlace / do not follow this link