[Bug 3541] New: remote-to-remote case doesn't look at sshport

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Fri Feb 17 04:55:37 AEDT 2023


https://bugzilla.mindrot.org/show_bug.cgi?id=3541

            Bug ID: 3541
           Summary: remote-to-remote case doesn't look at sshport
           Product: Portable OpenSSH
           Version: 9.1p1
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: scp
          Assignee: unassigned-bugs at mindrot.org
          Reporter: tractorboy at gmail.com

I tried to create a PR on Github but couldn't push. Is it restricted to
certain collaborators? Would have been nice for me to raise a PR for
this with a fix :).

Anyway, for OpenSSH8.0 (7.4 worked fine), the -P argument gets dropped.
"-o Port=" works fine as a workaround. As does specifying the port
number in a URI

Here's my command with the first line of debug output (don't think the
"-4" is valid that's just what I happened to be using)

> scp -v -4 -i /users/<me>/.ssh/<private key> -P 28001 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o LogLevel=DEBUG root at localhost:/<path to file> <me>@<remote ip>:<dest dir>
Executing: /usr/bin/ssh -x -oClearAllForwardings=yes -t -v -4 -i
/users/<me>/.ssh/<private key> -p 28001 -o UserKnownHostsFile=/dev/null
-o StrictHostKeyChecking=no -o ConnectTimeout=10 -o LogLevel=DEBUG -l
root -- localhost scp -v <path to file> <me>@<remote ip>:<dest dir>


It looks like at
https://github.com/openssh/openssh-portable/blob/master/scp.c#L1160 you
need to set sport to sshport if sshport is valid (and sport is invalid?
Not completely on top of that)
I'm not sure why that case is not calling do_cmd/do_cmd2 (which do
correctly consider sshport)

-- 
You are receiving this mail because:
You are watching the assignee of the bug.


More information about the openssh-bugs mailing list