I got it working by converting the string into atom.
iex(xyz@172.17.0.4)> node = "abc@172.17.0.2"iex(xyz@172.17.0.4)> Node.connect(String.to_atom(node))iex(xyz@172.17.0.4)> true