Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get another node's cookie in Erlang?

Tags:

erlang

Is it possible to get the cookie of another node knowing its nodename, both from erlang or OS env?

I did not find any erlang:get_cookie/2.

like image 982
liuzhen Avatar asked Jan 07 '23 02:01

liuzhen


1 Answers

Security is the main reason for erlang cookies, as explained in Distributed Erlang Security Section. If you could get the cookie from a different node only with its nodename it won't be secured. Everybody will be able to get your cookie and connect to your machine and do whatever they like.

Although this kind of security is poor because it is just a simple unique value like a password and that's it, you won't be able to get the cookie from other machine using erlang.

I would suggest you to read more about it at Learn You Some Erlang site.

like image 56
A. Sarid Avatar answered Jan 08 '23 14:01

A. Sarid