[opensuse] ssh -x: obscure output delay
Hi, I am having some weird effect when using ssh -x. I have a perl-script '/scripts/colorlogs' that colors log output. I have a bash script '/scripts/mess' that calls 'tail -fn48 /var/log/messages | /scripts/colorlogs'. Now, when I ssh to the machine and call /scripts/mess, everything is just fine. However, when I call 'ssh root@machine -x /scripts/mess', the script is running but the last few lines of the file are missing. Sometimes, the output stops in the middle of a line. It looks like sshd when connected by 'ssh -x' would use some buffer and would only transmit data to the client when the buffer is full. Does anybody happen to know how to avoid this? T:Stefan -- (o_ Stefan Gofferje | SCLT, MCP, CCSA //\ Reg'd Linux User #247167 | VCP #2263 V_/_ Heckler & Koch - the original point and click interface -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Saturday 25 August 2012 10:32:33 Stefan Gofferje wrote:
I am having some weird effect when using ssh -x.
I have a perl-script '/scripts/colorlogs' that colors log output. I have a bash script '/scripts/mess' that calls 'tail -fn48 /var/log/messages | /scripts/colorlogs'.
Now, when I ssh to the machine and call /scripts/mess, everything is just fine. However, when I call 'ssh root@machine -x /scripts/mess', the script is running but the last few lines of the file are missing. Sometimes, the output stops in the middle of a line. It looks like sshd when connected by 'ssh -x' would use some buffer and would only transmit data to the client when the buffer is full.
Does anybody happen to know how to avoid this?
* "when I ssh to the machine and call /scripts/mess" : as root too, of course ? * Could you post the mess script, if it is not secret and not too long please ? * Maybe you mixed "ssx -x" and "ssh -X" ? Dsant, in the train thanks 3G :) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi, On 08/25/2012 12:41 PM, Dsant wrote:
* Could you post the mess script, if it is not secret and not too long please ?
As posted above, /scripts/mess calls "tail -fn50 /var/log/messages | /scripts/colorlogs"
* Maybe you mixed "ssx -x" and "ssh -X" ?
Nope, I disable X-forwarding in this connection intentionally. However, I just got the answer via PM... ssh -t is the solution. tail dies if not attached to a (pseudo-)terminal. T:Stefan -- (o_ Stefan Gofferje | SCLT, MCP, CCSA //\ Reg'd Linux User #247167 | VCP #2263 V_/_ Heckler & Koch - the original point and click interface -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
Dsant
-
Stefan Gofferje