Forrest logo
back to the erl tool

erl:tldr:6ac52

erl: Connect to a running Erlang node.
$ erl -remsh ${nodename}@${hostname} -sname ${custom_shortname} -hidden -setcookie ${cookie_of_remote_node}
try on your machine

This command is used to initiate a remote shell connection to a Erlang node running on a different host (or the same host if desired).

Here is a breakdown of the command and its options:

  • erl: This is the Erlang runtime command. It is used to start the Erlang system.

  • -remsh {nodename}@{hostname}: This option specifies the remote node with which you want to establish a shell connection. {nodename} is the name of the remote node, and {hostname} is the hostname or IP address of the remote machine.

  • -sname {custom_shortname}: This option allows you to specify a custom short name for the local node. {custom_shortname} is the desired short name for the local node.

  • -hidden: This option makes the local node hidden and does not advertise it to other nodes on the network.

  • -setcookie {cookie_of_remote_node}: This option sets the authentication cookie for the remote node. {cookie_of_remote_node} is the cookie value of the remote node, which must match for successful communication.

Overall, this command connects to a remote Erlang node using a specified node name and hostname, sets a custom short name for the local node, hides the local node from other nodes, and authenticates with the remote node using a cookie.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the erl tool