Module Process_env

Utility functions for dealing with the environment.

module Unix := Core_unix
val parse_ssh_client : ?var_name:string -> unit -> [ `From of Unix.Inet_addr.t | `Nowhere ] Core.Or_error.t

parse_ssh_client reads an environment variable and retrieves the IP from which you are currently sshing.

val ssh_client_var_name : string

The environment variable ssh_client_var_name will contain the IP address of the current SSH client.

Example: A user is physically using host A. The user sshes from host A to host B and then from host B to host C. If checked on host C, the IP address will point to host B.