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

Jachym Holecek freza@REDACTED
Sun Jan 20 21:16:20 CET 2013


# 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)
	(foo@REDACTED)1>

  Terminal 2:
	# erl -sname bar -setcookie abc -remsh foo@REDACTED
	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)
	(foo@REDACTED)1> node().
	foo@REDACTED
	(foo@REDACTED)2> nodes().
	[bar@REDACTED]
	(foo@REDACTED)3>

BR,
	-- Jachym



More information about the erlang-questions mailing list