[plug] Novel way to port forward over ssh

Craig Ringer craig at postnewspapers.com.au
Wed Jan 5 08:35:14 WST 2005


On Wed, 2005-01-05 at 08:26 +0800, James Devenish wrote:

> On Mon, Jan 03, 2005 at 11:59:54PM +0800, Craig Ringer wrote:
> > Bizarrely, ssh is doing LF->CRLF conversion on the output stream
> > when sending data from a command that was run using 'command=' in
> > authorized_keys. If the command is run as the normal command argument
> > on ssh rather than forced in authorized_keys, the line ending
> > conversion is not done.
> 
> Sorry for coming late to this thread. In sshd(8), where the 'command'
> syntax is described, the following passage is of significance:
> 
>     The command is run on a pty if the client requests a pty; otherwise
>     it is run without a tty.  If a 8-bit clean channel is required, one
>     must not request a pty or should specify no-pty.
> 
> I think that the cause of end-of-line conversion is that ssh thinks
> it is providing output to a terminal which requires it. I use no-pty
> myself and I have not had problems with end-of-line conversion.

I read that man page (or thought I did), plus did a bit of searching
around looking for information on ensuring an eight-bit clean channel.
How I missed that is beyond me.

Thanks, James.

-- 
Craig Ringer




More information about the plug mailing list