File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -241,17 +241,17 @@ The `p2p` command needs to be enabled in config:
241241
242242### How to use
243243
244+ ** Netcat example:**
245+
244246First, pick a protocol name for your application. Think of the protocol name as
245247a port number, just significantly more user-friendly. In this example, we're
246248going to use ` /kickass/1.0 ` .
247249
248- ** Setup:**
250+ *** Setup:* **
249251
2502521 . A "server" node with peer ID ` $SERVER_ID `
2512532 . A "client" node.
252254
253- ** Netcat example:**
254-
255255*** On the "server" node:***
256256
257257First, start your application and have it listen for TCP connections on
@@ -296,6 +296,31 @@ exchange messages between netcat instances.
296296
297297(note that depending on your netcat version you may need to drop the ` -v ` flag)
298298
299+ ** SSH example**
300+
301+ ** Setup:**
302+
303+ 1 . A "server" node with peer ID ` $SERVER_ID ` and running ssh server on the
304+ default port.
305+ 2 . A "client" node.
306+
307+ _ you can get ` $SERVER_ID ` by running ` ipfs id -f "<id>\n" ` _
308+
309+ *** First, on the "server" node:***
310+
311+ ``` sh
312+ ipfs p2p forward ssh /ipfs /ip4/127.0.0.1/tcp/22
313+ ```
314+
315+ *** Then, on "client" node:***
316+
317+ ``` sh
318+ ipfs p2p forward ssh /ip4/127.0.0.1/tcp/2222 /ipfs/$SERVER_ID
319+ ```
320+
321+ You should now be able to connect to your ssh server through a libp2p connection
322+ with ` ssh [user]@127.0.0.1 -p 2222 ` .
323+
299324
300325### Road to being a real feature
301326- [ ] Needs more people to use and report on how well it works / fits use cases
You can’t perform that action at this time.
0 commit comments