View Single Post
Old 11-22-2020, 04:05 PM   #7
bmsleight
Member
bmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enoughbmsleight will become famous soon enough
 
Posts: 24
Karma: 540
Join Date: Aug 2010
Device: Kindle 3
From the openwrt machine

Code:
root@OpenWrt:~# cat ./test.sh 
rm  /tmp/example.pipe
mkfifo /tmp/example.pipe
cat /tmp/example.pipe  | netcat -l -vvv  -p  5001 &
sleep 1

screen -dmS default_session -t screen_name 
screen -S default_session -p screen_name  -X stuff 'ssh  root@192.168.1.105 "nc 192.168.1.126 5001 | tee -i" \r'


sleep 1
echo "hi" >/tmp/example.pipe 
echo "world" >/tmp/example.pipe 

root@OpenWrt:~# /bin/ash test.sh 
Listening on any address 5001
Connection from 192.168.1.105:37688
root@OpenWrt:~# screen -S default_session -p screen_name  -X kill
root@OpenWrt:~# Total received bytes: 0
Total sent bytes: 9
I can have KUAL trigger the openwrt machine

Thanks for the replies. Back to tidying up and finding the next snag.
bmsleight is offline   Reply With Quote