IETF-SSH archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Where to find protocol spec for SCP under SSH-1
I'm a relative newbie to the SSH space. At the highest level I think I'm looking
for an old SSH-1 protocol specification to try to understand how SCP worked.
A customer has hit the problem described at:
http://www.snailbook.com/faq/scp-ossh-to-ssh2.auto.html
with our SSH implementation (OpenVMS). In a nutshell this problem involves the
SCP client (RH Linux in our case) sending "scp -f file.name" as an rexec style
command to our SSH-2 only implementation. (Our implementation expects SCP to be
implemented "layered" on SFTP.) Our implementation is fprintfing the following
text to stderr:
tcpip$ssh_scp2.exe: warning: Executing scp1 compatibility.
tcpip$ssh_scp2.exe: FATAL: Executing ssh1 in compatibility mode failed (Check
that scp1 is in your PATH).
In our implementation of SSH stderr turns out to be the PTY going to the SSH
server parent process and all data sent to the PTY from the child (which is
running the "scp -f file.name" command) ends up being sent over the encrypted
channel to the client. However the data is not being displayed to the client as
an error message. Instead we get this at the client:
[user@rhlinux user]$ scp user@serverhost:z.z z.z
protocol error: unexpected <newline>
[user@rhlinux user]$
What I would like to see is:
[user@rhlinux user]$ scp user@serverhost:z.z z.z
tcpip$ssh_scp2.exe: warning: Executing scp1 compatibility.
tcpip$ssh_scp2.exe: FATAL: Executing ssh1 in compatibility mode failed (Check
that scp1 is in your PATH).
[user@rhlinux user]$
Well, we should change our code to use different text, since scp1 is simply not
implemented on our platform. So we might have:
[user@rhlinux user]$ scp user@serverhost:z.z z.z
tcpip$ssh_scp2.exe: FATAL: scp1 compatibility mode is not supported
[user@rhlinux user]$
The point is that I want to be able to package the error text data being sent
back to the client in such a way that the client recognizes the data as error
text and displays it to the user as such.
Is there a way to do this? I would think that to find out if there is I need to
know what sort of data the scp client is expecting to see on the wire. Perhaps
there is a provision for the server to send an error text message? In some debug
traces I have seen that the client is apparently sending a single byte of 0 to
our side at the beginning of all of this. Some sort of SCP message? In some
other cases I've seen it send its own error text, "protocol error: unexpected
<newline>", with a single leading byte of 1. Here's a dump from our ssh server
parent log:
debug: SshUnixFdStream/SSHUNIXFDSTREAM.C:663: ssh_stream_fd_write wrote 43 bytes
debug: SshUnixFdStream/SSHUNIXFDSTREAM.C:665: data:
debug: 00000000: 0173 6370 3a20 7072 6f74 6f63 6f6c 2065 .scp: protocol e
debug: 00000010: 7272 6f72 3a20 756e 6578 7065 6374 6564 rror: unexpected
debug: 00000020: 203c 6e65 776c 696e 653e 0a <newline>.
Note that the first byte of the sequence is 01. Is this an old-style scp message
type byte? I dunno. Anyway I think I need a spec to figure it out.
Thanks in advance,
Karol
Home |
Main Index |
Thread Index |
Old Index