-
Notifications
You must be signed in to change notification settings - Fork 138
Retrieve scp errors #180
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 e 8000 mails.
Already on GitHub? Sign in to your account
Comments
scp is supposed to show those, see |
@remram44 I get no errors at all, unfortunately. Printing the
shows
|
You mean that the transfer succeeds either way (scp returns 0) but it prints this message? You can try |
openssh scp indeed has an 0 exit code. (even though the error message is printed) Calling Modifying |
@remram44 the same (TimeoutError) occurs when calling I have tried to sleep for a few seconds before calling these to make sure the other side had time to send the message, but that did not result in any change either. |
Ok I don't know how this message is sent then, sorry. |
I'm trying to use this lib with paramiko to push a config file to a fortigate. The fortigate has some validation logic to check if the config is valid or not.
Using openssh
scp
, that looks like this:...and with
-vvv
(shortened to the relevant parts):I need to read the
500-Invalid config file
output to validate whether the config push was successful or not.I tried playing around with reading from
self.channel.makefile()
andself.channel.makefile_stderr()
and withself.channel.recv()
, but had no success at all.@remram44 Do you have any idea how I could achieve this?
The text was updated successfully, but these errors were encountered: