[erlang-questions] Quick connect to another node with erl
Loïc Hoguin
essen@REDACTED
Wed Jan 23 00:30:55 CET 2013
On 01/23/2013 12:20 AM, Tomas Morstein wrote:
> ----- Original Message -----
>> Od: "Loïc Hoguin" <essen@REDACTED>
>> Komu: "Tomas Morstein" <tmr@REDACTED>
>> Kopie: erlang-questions@REDACTED
>> Odeslané: Úterý, 22. Leden 2013 23:05:33
>> Předmět: Re: [erlang-questions] Quick connect to another node with erl
>>
>> On 01/22/2013 11:02 PM, Tomas Morstein wrote:
>>> 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 bar@REDACTED 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 :-) ).
>>
>> init:stop() seems to stop the local node, not the remote node.
>
> Are you sure? Depends on what you define as remote and local.
> Everything you write is executed on the remote node which is
> local from the point of view of the (remote) shell.
No, you are right, I got confused by what happens when you use -eval at
the same time (which is ran locally). That explains it.
--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
More information about the erlang-questions
mailing list