Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1056757 - scp broken (permissions) with 0.6.0
Summary: scp broken (permissions) with 0.6.0
Alias: None
Product: Fedora
Classification: Fedora
Component: libssh
Version: 19
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Andreas Schneider
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2014-01-22 20:53 UTC by Orion Poplawski
Modified: 2014-02-22 00:43 UTC (History)
5 users (show)

Fixed In Version: libssh-0.6.1-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-02-11 23:10:50 UTC

Attachments (Terms of Use)

Description Orion Poplawski 2014-01-22 20:53:05 UTC
Description of problem:

This commit broke scp:

commit f2c2687ca6c6c7e25c9a547227027ab28eb4fc16
Author: Oliver Stöneberg <>
Date:   Fri Oct 18 14:58:04 2013 +0200

    scp: Fixed result of ssh_scp_string_mode() to get SCP working.

    Reviewed-by: Andreas Schneider <>

diff --git a/src/scp.c b/src/scp.c
index 6838a3c..db07aed 100644
--- a/src/scp.c
+++ b/src/scp.c
@@ -814,7 +814,7 @@ int ssh_scp_integer_mode(const char *mode){
 char *ssh_scp_string_mode(int mode){
        char buffer[16];
-       snprintf(buffer,sizeof(buffer),"%.4o",mode);
+       snprintf(buffer,sizeof(buffer),"%.4d",mode);
The mode does need to be an octal numeric string. Mode 0600 now gets sent on the wire as 0384, triggering a "scp: protocol error: bad mode" response, and an "scp status code 1d not valid" message from libssh.

Version-Release number of selected component (if applicable):

Comment 1 Kevin Kofler 2014-01-28 00:26:21 UTC
Looks like this one is really easy to fix, shouldn't we push a libssh update with that fixed? (Maybe x2go would then at least work with the "ignore the key mismatch" workaround?)

Comment 2 Andreas Schneider 2014-02-07 12:54:33 UTC
I plan to do libssh 0.6.1 release today or tomorrow. It will have this issue fixed!

Comment 3 Fedora Update System 2014-02-10 09:45:57 UTC
libssh-0.6.1-1.fc19 has been submitted as an update for Fedora 19.

Comment 4 Fedora Update System 2014-02-10 10:01:18 UTC
libssh-0.6.1-1.fc20 has been submitted as an update for Fedora 20.

Comment 5 Fedora Update System 2014-02-11 23:10:50 UTC
libssh-0.6.1-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2014-02-22 00:43:58 UTC
libssh-0.6.1-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.