Skip to content

Commit 09857ac

Browse files
committed
Remove EOF Check
* Cisco SCP server will close the channel after retreiving a file and calling `ssh_scp_pull_request` will return `-1` and raise an exception aborting `get`
1 parent 27ce4de commit 09857ac

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Remove the SCP EOF message check in the `get` method to allow libssh clients
2+
get files from Cisco SCP servers. -- by :user:`timway`.

src/pylibsshext/scp.pyx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,6 @@ cdef class SCP:
159159
remaining_bytes_to_read -= read_bytes
160160
if mode >= 0:
161161
os.chmod(local_file, mode)
162-
163-
# Make sure we have finished requesting files
164-
rc = libssh.ssh_scp_pull_request(scp)
165-
if rc != libssh.SSH_SCP_REQUEST_EOF:
166-
raise LibsshSCPException("Unexpected request: %s" % self._get_ssh_error_str())
167-
168162
finally:
169163
if read_buffer is not NULL:
170164
PyMem_Free(read_buffer)

0 commit comments

Comments
 (0)