Connect to a device

Reach another device in your network by address or by name — SSH, remote desktop, file shares and web apps — and check the path the connection takes.

Updated · ·By Ivan Vyshniak

Showing Windows instructions.

This page changes with your operating system.

Once two devices are in the same network, and the access policy allows it, you connect to the other device's Peerlify address the same way you would on a LAN. No extra software or port forwarding is needed.

Find the device's address or name

shell
peerlify list peers
text
build-server.k3x9q2m7pa.peerlify.net (100.100.0.12)
prod-db.k3x9q2m7pa.peerlify.net (100.100.0.15)

The list shows the devices this device is allowed to connect to. The console's Devices page shows every device's address.

Connect

Use the address, or on Windows and macOS the device's name.

SSH:

shell
ssh alice@100.100.0.12
ssh alice@build-server

This reaches the SSH server already running on that device, with the keys or passwords it expects. To log in to a Linux device without keys, with the network's rules deciding who may log in as whom, see SSH to a device without keys.

Remote Desktop on Windows:

powershell
mstsc /v:build-server

A web app on port 8080:

shell
curl http://build-server.k3x9q2m7pa.peerlify.net:8080/

A Windows file share:

powershell
net use Z: \\build-server\builds

The service you connect to must be listening on the device's Peerlify interface (or on all interfaces), and the device's own firewall must allow it. On Windows, the network adapter is named Peerlify.

Names

On Windows and macOS, the client adds each reachable peer to the hosts file under two names: the short name (build-server) and the full name (build-server.k3x9q2m7pa.peerlify.net, where the middle part is the network ID). Names are lowercased, cut at the first dot, and other characters become -. See Devices.

On Linux, names aren't added. Use the address, or add the entries to /etc/hosts yourself. peerlify ping build-server still works, because the client looks the name up itself.

Check the connection

shell
peerlify ping build-server -c 3
text
pong from build-server.k3x9q2m7pa.peerlify.net (100.100.0.12) via RELAY(203.0.113.10:5879) in 61.2ms
pong from build-server.k3x9q2m7pa.peerlify.net (100.100.0.12) via 198.51.100.23:41641 in 14.7ms
pong from build-server.k3x9q2m7pa.peerlify.net (100.100.0.12) via 198.51.100.23:41641 in 14.5ms

The first replies often come through a relay, and later ones directly once a direct path is found. See Direct and relayed connections.

peerlify ping checks that Peerlify can reach the other device. It doesn't test a specific port: a ping can succeed while your application's port is still blocked by an access rule or the device's firewall. To test a port:

Windows
powershell
Test-NetConnection 100.100.0.12 -Port 3389
macOS
shell
nc -vz 100.100.0.12 22
Linux
shell
nc -vz 100.100.0.12 22

Devices without the Peerlify client

Every device you want to reach must run the client. Peerlify doesn't route to other machines on a device's local network, such as a printer next to a server. An exit point carries traffic to the internet only, not to private networks.

If it doesn't connect

See Troubleshoot connectivity.

Next steps

Was this page helpful?