diff --git a/docs/experimental-features.md b/docs/experimental-features.md index cff1039db..b8cb655d5 100644 --- a/docs/experimental-features.md +++ b/docs/experimental-features.md @@ -273,17 +273,17 @@ The `p2p` command needs to be enabled in config: ### How to use +**Netcat example:** + First, pick a protocol name for your application. Think of the protocol name as a port number, just significantly more user-friendly. In this example, we're going to use `/kickass/1.0`. -**Setup:** +***Setup:*** 1. A "server" node with peer ID `$SERVER_ID` 2. A "client" node. -**Netcat example:** - ***On the "server" node:*** First, start your application and have it listen for TCP connections on @@ -328,6 +328,31 @@ exchange messages between netcat instances. (note that depending on your netcat version you may need to drop the `-v` flag) +**SSH example** + +**Setup:** + +1. A "server" node with peer ID `$SERVER_ID` and running ssh server on the + default port. +2. A "client" node. + +_you can get `$SERVER_ID` by running `ipfs id -f "\n"`_ + +***First, on the "server" node:*** + +```sh +ipfs p2p forward ssh /ipfs /ip4/127.0.0.1/tcp/22 +``` + +***Then, on "client" node:*** + +```sh +ipfs p2p forward ssh /ip4/127.0.0.1/tcp/2222 /ipfs/$SERVER_ID +``` + +You should now be able to connect to your ssh server through a libp2p connection +with `ssh [user]@127.0.0.1 -p 2222`. + ### Road to being a real feature - [ ] Needs more people to use and report on how well it works / fits use cases