### Invoke rlogind with Kerberos options Source: https://www.gnu.org/software/inetutils/manual/html_node/rlogind-invocation.html Examples of starting rlogind with Kerberos authentication and custom server principal configurations. ```bash rlogind -k -S alias.server.our rlogind --kerberos --server-principal=@NEW.REALM rlogind -k -x -S rlogin/backup.ex.org@OUR.REALM ``` -------------------------------- ### Example TFTP client requests Source: https://www.gnu.org/software/inetutils/manual/html_node/tftpd-invocation.html Example TFTP client commands that would be allowed with the standard configuration, given that the referenced files exist. ```text get kernel get /tftpboot/kernel get kernel.alt get /altboot/kernel.alt get /etc/motd ``` -------------------------------- ### tftp get command with IPv6 Source: https://www.gnu.org/software/inetutils/manual/html_node/tftp-invocation.html Example of using the get command with an IPv6 address enclosed in square brackets. ```bash tftp> get [2001:1234::12]:issue ``` -------------------------------- ### Custom execution string example Source: https://www.gnu.org/software/inetutils/manual/html_node/telnetd-invocation.html Example of using the -E option to override the built-in login execution with a custom handler. ```text telnetd -h -E '/usr/local/sbin/avrop %t %U' ``` -------------------------------- ### Define TCPMUX services in inetd.conf Source: https://www.gnu.org/software/inetutils/manual/html_node/TCPMUX.html Example service entries for various types of services, including the required tcpmux internal definition and specific tcpmux service examples. ```text ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l ntalk dgram udp wait nobody:tty /usr/libexec/talkd talkd tcpmux stream tcp nowait root internal tcpmux/+date stream tcp nowait guest /bin/date date tcpmux/phonebook stream tcp nowait guest /usr/bin/phonebook phonebook ``` -------------------------------- ### ftp and pftp command-line synopsis Source: https://www.gnu.org/software/inetutils/manual/html_node/ftp-invocation.html Shows the general command-line syntax for ftp and pftp, including optional host and port arguments, and the user@host form. The pftp variant starts in passive mode but is otherwise identical to ftp. ```text ftp [option...] [host [port]] pftp [option...] [host [port]] ftp [option...] user@host [port] pftp [option...] user@host [port] ``` -------------------------------- ### nmap command example Source: https://www.gnu.org/software/inetutils/manual/html_node/Ftp-commands.html Sets file name mapping with pattern $1.$2.$3 to [$1,$2].[$2,file]. Yields myfile.data for myfile.data and myfile.data.old, myfile.file for myfile, and myfile.myfile for .myfile. ```ftp nmap $1.$2.$3 [$1,$2].[$2,file] ``` -------------------------------- ### rexecd invocation syntax Source: https://www.gnu.org/software/inetutils/manual/html_node/rexecd-invocation.html Shows the command-line syntax for starting rexecd. The only option is --logging, which raises the logging level and can be used multiple times for increased verbosity. ```shell rexecd [option]... ``` -------------------------------- ### Expanded execution string with conditional Source: https://www.gnu.org/software/inetutils/manual/html_node/telnetd-invocation.html Expanded example using the conditional construct to choose between authenticated user and environment variable. ```text telnetd -h -E '/usr/local/sbin/avrop %t %?a{%u krb5}{%U}' ``` -------------------------------- ### syslogd configuration file example Source: https://www.gnu.org/software/inetutils/manual/html_node/syslogd-invocation.html Example syslogd configuration file showing various logging rules. Selectors like '*.err;kern.*;auth.notice;authpriv.none' direct messages to destinations such as '/dev/console' or remote hosts. Note that multiple selectors can have non-intuitive effects; for instance, 'mail.crit,*.err' selects mail facility messages at level 'err' or higher, not 'crit' or higher. ```plaintext # Log all kernel messages, authentication messages of # level notice or higher and anything of level err or # higher to the console. # Don't log private authentication messages! *.err;kern.*;auth.notice;authpriv.none /dev/console # Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none /var/log/messages # The authpriv file has restricted access. authpriv.* /var/log/secure # Log all the mail messages in one place. mail.* /var/log/maillog # Everybody gets emergency messages, plus log them on another # machine. *.emerg * *.emerg @arpa.berkeley.edu # Root and Eric get alert and higher messages. *.alert root,eric # Simplify security auditing, by collecting sudo uses. ! sudo *.info /var/log/sudo # Collect time server reports. #! ntpd *.* /var/log/ntpd # Stop selecting on message tags. !* # Save mail and news errors of level err and higher in a # special file. uucp,news.crit /var/log/spoolerr ``` -------------------------------- ### Create a symbolic link to invoke rlogin by hostname Source: https://www.gnu.org/software/inetutils/manual/html_node/rlogin-invocation.html Shows how to create a symbolic link named after a hostname so that typing the hostname automatically invokes rlogin to that remote host. The second command, 'hostname -8', is shown as an example of using the link. ```shell # ln -s /usr/bin/rlogin hostname # hostname -8 ``` -------------------------------- ### nmap with spaces removal example Source: https://www.gnu.org/software/inetutils/manual/html_node/Ftp-commands.html Shows how to include spaces in outpattern and remove them using sed. The command pipes the output of nmap to sed to strip trailing spaces. ```ftp nmap $1 |sed "s/ *$//" > $1 ``` -------------------------------- ### Remote shell command execution example Source: https://www.gnu.org/software/inetutils/manual/html_node/rsh-invocation.html An example of a command executed entirely on the remote host due to quoted redirection. ```bash cat remotefile >> localfile ``` -------------------------------- ### hostname synopsis Source: https://www.gnu.org/software/inetutils/manual/html_node/hostname-invocation.html Shows the usage syntax for the hostname command: either with options or with a name argument to set the host name. ```text hostname [option...] hostname name ``` -------------------------------- ### Default address specifier example Source: https://www.gnu.org/software/inetutils/manual/html_node/Configuration-file.html Shows a line with a host address specifier and colon but no further fields, which sets a default address for subsequent lines. ```plaintext 127.0.0.1,192.168.0.5: ``` -------------------------------- ### ftp: pipe directory listing to less Source: https://www.gnu.org/software/inetutils/manual/html_node/File-naming-conventions.html Example of using the '|' prefix to pipe the output of the 'dir' command to the 'less' pager, allowing scrolling through a long directory listing. ```ftp ftp> dir . |less ``` -------------------------------- ### Log file to remote host with source IP Source: https://www.gnu.org/software/inetutils/manual/html_node/logger-invocation.html Logs each line from the file 'warnings' to the 'daemon.warn' channel on host 'logger.runasimi.org', using source IP '10.10.10.1'. ```bash logger -p daemon.warn -h logger.runasimi.org -S 10.10.10.1 \ --file warnings ``` -------------------------------- ### tftp command synopsis Source: https://www.gnu.org/software/inetutils/manual/html_node/tftp-invocation.html The basic syntax for invoking the tftp client. ```bash tftp [option]... host ``` -------------------------------- ### ping synopsis Source: https://www.gnu.org/software/inetutils/manual/html_node/ping-invocation.html Shows the command-line syntax for ping: `ping [option...] host`. The host is required; options are optional. ```text ping [option...] host ```