'ssh -1 -L < named_pipe' freezes
Ilya Basin
basinilya@gmail.com
Tue Apr 9 17:35:00 GMT 2013
Here's my script that works on linux:
cmd="ssh -T -N -g -1 -L 10001:anotherhost:22"
fifo=`mktemp -u`
mkfifo "$fifo"
$cmd <"$fifo" &
exec 3>"$fifo"
# message: Pseudo-terminal will not be allocated because stdin is not a terminal.
# netstat shows that port 10001 is LISTENING
# from another terminal: ssh -p 10001 localhost
#printf '\0' >&3 # unfreeze on Cygwin
wait
-N is ignored for protocol version 1, so as a workaround I redirect
input from an eternal pipe.
I want to save processes, so I'm using a named pipe instead of
something like:
sleep | ssh
On Cygwin when I try to use the forwarded port, the new client freezes
until I write something to the pipe.
This happens only with named pipes. Normal pipes work well.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list