[erlang-questions] Quick connect to another node with erl

Tomas Morstein <>
Tue Jan 22 23:02:07 CET 2013

Dne neděle, 20. ledna 2013 21:16:20 UTC+1 Jachym Holecek napsal(a):
> # Ward Bekker (TTY) 2013-01-20: 
> > I want to connect to the shell on node  My current 
> solution 
> > (see below) needs some user switch commands. Is there a way using CL 
> > arguments? Couldn't find a mention in the erl man page. 
> Yes, using -remsh, like this: 
>   Terminal 1: 
>         # erl -sname foo -setcookie abc 
>         Erlang R14B04 (erts-5.8.5) [source] [64-bit] [smp:4:4] [rq:4] 
> [async-threads:0] [kernel-poll:false] 
>         Eshell V5.8.5  (abort with ^G)

It's worth to note that `remsh' should be used with extra care, especially
when it comes to connecting live production systems.
Time by time, it happens (at least to me) that someone accidentally
issues `q().' instead of ^G-q. The result is remote node shutdown what
is usually not what we wanted to do, although `q().' is good habit 
otherwise :)

That's why I would recommend you to use extra VM options to restrict
the shell and block at least `q()' and friends (well, I've never seen
anybody who accidentally typed `init:stop()' yet :-) ).

In production, we do it like this: `+Bi -stdlib restricted_shell 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130122/82eff27a/attachment.html>

More information about the erlang-questions mailing list