how do I connect two linodes by private ip?
If you have two Linodes in the same data center, just follow these steps to add private IPs to them:
To ensure the private IPs are properly configured once added, it's best to just reboot the Linode; if you have Network Helper enabled (which you should by default), the addresses will be configured automatically.
From there you can just configure your applications to listen on the private address - doing so varies based on what application you're using.
It's important to understand that this means your private IPs are reachable via any other private IP addresses within that particular Linode data center - not just other Linodes that belong to you.
With that in mind, you'll want to possibly look into configuring a firewall, or even a VPN connection between machines, depending on what kind of traffic is being sent between them.