Date: Tue, 16 Jan 2001 16:28:51 -0800 From: "Crist J. Clark" <cjclark@reflexnet.net> To: freebsd-questions@freebsd.org Subject: Broken "command" in authorized_keys in OpenSSH (Re: Broken "command" in authorized_keys in 2.8?) Message-ID: <20010116162851.A56795@rfx-64-6-211-149.users.reflexco>
next in thread | raw e-mail | index | archive | help
Could someone independently reproduce the problem below so I can start sending out PRs? Better yet, can anyone tell me if I am doing something too stoopid to break it? And if anyone is using OpenSSH on other platforms, besides OpenBSD and FreeBSD, could you try it and drop me a line _off the list_ on whether the bug is there too? ----- Forwarded message from "Crist J. Clark" <cjclark@reflexnet.net> ----- Date: Tue, 16 Jan 2001 12:42:38 -0800 From: "Crist J. Clark" <cjclark@reflexnet.net> To: misc@openbsd.org Subject: Broken "command" in authorized_keys in OpenSSH (Re: Broken "command" in authorized_keys in 2.8?) Reply-To: cjclark@alum.mit.edu X-Mailer: Mutt 1.0i In-Reply-To: <20010116110444.A56150@rfx-64-6-211-149.users.reflexco>; from cjclark@reflexnet.net on Tue, Jan 16, 2001 at 11:04:44AM -0800 I think I have narrowed it down a bit. First, as I thought, this has nothing to do with tar, cd, or semicolons. It just so happens that is what I was using when I found it and first tested it. The problem can be reproduced with, command="cat file" It looks like OpenSSH is adding some characters. I just tried it on a FreeBSD system with OpenSSH, [541:~] cat .ssh/authorized_keys command="cat ssh.cat" 1024 35 11656620417443995875... ... [535:~] man ssh > ssh.cat [536:~] ssh -i sshtest localhost > ssh.cat.out Connection to localhost closed. [537:~] hexdump -C ssh.cat | head ; echo "" ; hexdump -C ssh.cat.out | head 00000000 53 53 48 28 31 29 09 09 09 46 72 65 65 42 53 44 |SSH(1)...FreeBSD| 00000010 20 47 65 6e 65 72 61 6c 20 43 6f 6d 6d 61 6e 64 | General Command| 00000020 73 20 4d 61 6e 75 61 6c 20 09 09 53 53 48 28 31 |s Manual ..SSH(1| 00000030 29 0a 0a 4e 08 4e 41 08 41 4d 08 4d 45 08 45 0a |)..N.NA.AM.ME.E.| ^^ ^^ 00000040 20 20 20 20 20 73 08 73 73 08 73 68 08 68 20 2d | s.ss.sh.h -| 00000050 20 4f 70 65 6e 53 53 48 20 73 65 63 75 72 65 20 | OpenSSH secure | 00000060 73 68 65 6c 6c 20 63 6c 69 65 6e 74 20 28 72 65 |shell client (re| 00000070 6d 6f 74 65 20 6c 6f 67 69 6e 20 70 72 6f 67 72 |mote login progr| 00000080 61 6d 29 0a 0a 53 08 53 59 08 59 4e 08 4e 4f 08 |am)..S.SY.YN.NO.| 00000090 4f 50 08 50 53 08 53 49 08 49 53 08 53 0a 20 20 |OP.PS.SI.IS.S. | 00000000 53 53 48 28 31 29 09 09 09 46 72 65 65 42 53 44 |SSH(1)...FreeBSD| 00000010 20 47 65 6e 65 72 61 6c 20 43 6f 6d 6d 61 6e 64 | General Command| 00000020 73 20 4d 61 6e 75 61 6c 20 09 09 53 53 48 28 31 |s Manual ..SSH(1| 00000030 29 0d 0a 0d 0a 4e 08 4e 41 08 41 4d 08 4d 45 08 |)....N.NA.AM.ME.| ^^ ^^ ^^ ^^ 00000040 45 0d 0a 20 20 20 20 20 73 08 73 73 08 73 68 08 |E.. s.ss.sh.| 00000050 68 20 2d 20 4f 70 65 6e 53 53 48 20 73 65 63 75 |h - OpenSSH secu| 00000060 72 65 20 73 68 65 6c 6c 20 63 6c 69 65 6e 74 20 |re shell client | 00000070 28 72 65 6d 6f 74 65 20 6c 6f 67 69 6e 20 70 72 |(remote login pr| 00000080 6f 67 72 61 6d 29 0d 0a 0d 0a 53 08 53 59 08 59 |ogram)....S.SY.Y| 00000090 4e 08 4e 4f 08 4f 50 08 50 53 08 53 49 08 49 53 |N.NO.OP.PS.SI.IS| Note the pieces marked with '^^'. OpenSSH seems to be injecting 0x0d characters before 0x0a's for one. Sorry I'm posting output from a FreeBSD system, but it most convenient for testing this at the moment. Again, I originally discovered the coruption on OpenBSD, this really looks like an OpenSSH issue. (And this list is appropriate for OpenSSH talk? A redirect please if not.) But once again, can someone please give me an ACK or NACK about whether this is reproducible before I start sending out PRs? ----- End forwarded message ----- -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010116162851.A56795>