"title":"Command for connecting to another lightning node",
"description":[
"The **connect** RPC command establishes a new connection with another node in the Lightning Network.",
"",
"Connecting to a node is just the first step in opening a channel with another node. Once the peer is connected a channel can be opened with lightning-fundchannel(7).",
"",
"If there are active channels with the peer, **connect** returns once all the subdaemons are in place to handle the channels, not just once it's connected."
"The target node's public key. As a convenience, *id* may be of the form *id@host* or *id@host:port*. In this case, the *host* and *port* parameters must be omitted. This can fail if your C-lightning node is a fresh install that has not connected to any peers yet (your node has no gossip yet), or if the target *id* is a fresh install that has no channels yet (nobody will gossip about a node until it has one published channel)."
]
},
"host":{
"type":"string",
"description":[
"The peer's hostname or IP address. If *host* is not specified (or doesn't work), the connection will be attempted to an IP belonging to *id* obtained through gossip with other already connected peers. If *host* begins with a `/` it is interpreted as a local path and the connection will be made to that local socket (see **bind-addr** in lightningd-config(5))."
]
},
"port":{
"type":"u16",
"description":[
"The peer's port number. If not specified, the *port* depends on the current network:",