Skip to content

Scp on cisco device not working #829

Closed
@chenditc

Description

@chenditc

I tested on Cisco switch
SKU: Cisco-4351
Version: 17.3.2

When calling Upload from scp client: https://github.com/sshnet/SSH.NET/blob/develop/src/Renci.SshNet/ScpClient.cs#L209
The exec command "scp -t -d " will have two problem:

  1. -d is not supported on cisco router, which gives an "-p -d options not supported" error.
  2. cisco switch will throw back a "write failed" error.

In order to work with cisco router, the exec command needs to be: "scp -t ".

Is there anyway to configure this behavior in current code? I don't see anyway to do that.

I would like to make a PR and add an option to overwrite the exec behavior, have the user pass in the exact exec command, something like:

public void Upload(Stream source, string path, string handshakeExecCommand)

Any comments?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions