wisdumb4all / ganymed-ssh-2

Automatically exported from code.google.com/p/ganymed-ssh-2
Other
0 stars 0 forks source link

SCPClient put method should not send E command without D command #53

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Perform a SCPClient put to a server (e.g. a Cisco)
2. Note that it sends an 'E' command
3. Note that it did not at any stage send the D command
4. Note this is a protocol error

SSH Server version: Cisco IOS Software, CSR1000V Software 
(X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.4(2)S, RELEASE SOFTWARE (fc2)
Ganymed release: trunk
Client platform: OX-X

The closest I have to SCP protocol documentation is:
  https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works

This is clear that the 'E' command (End) is actually 'End of directory' not 
'End of file'.

Ganymed currently sends an scp 'E' command in its close() method. This would 
appear to be an error, at least when no 'D' command is set. There appears to be 
no code that sends a 'D' command.

On a Cisco, this causes the SCP session to error.

I enclose a patch fixing this.

Original issue reported on code.google.com by alex.bl...@gmail.com on 26 Nov 2014 at 12:47

Attachments: