Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scp: Invalid options #62

Open
jondunning opened this issue Jun 17, 2022 · 5 comments
Open

scp: Invalid options #62

jondunning opened this issue Jun 17, 2022 · 5 comments

Comments

@jondunning
Copy link

Hi,

Receiving the following error message when trying to CopyFromFile to remote device;

scp: Invalid options

Can't seem to work out why it's not working, any ideas?

@jondunning
Copy link
Author

If I change the following line in client.go from

err := a.Session.Run(fmt.Sprintf("%s -qt %q", a.RemoteBinary, remotePath))

to

err := a.Session.Run(fmt.Sprintf("%s -t %q", a.RemoteBinary, remotePath))

it works

@bramvdbogaerde
Copy link
Owner

Thanks for reporting.

Could you provide some information about the remote system (such as OS)?
Thanks.

@jondunning
Copy link
Author

Yes sure, it’s a digi transport wr21 router.

https://www.digi.com/resources/documentation/Digidocs/pdfs/90001019.pdf

It also doesn’t like having the file name wrapped in quotes. The file actually gets added to the router with the quotes retained. For example, should be config.da0 but ends up “config.da0”.

@nemith
Copy link

nemith commented Feb 21, 2024

Same problem with Junos (FreeBSD) devices.

@nemith
Copy link

nemith commented Mar 8, 2024

Sorry Cisco / NX-OS devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants