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
paramiko.ssh_exception.ProxyCommandFailure: ProxyCommand #2695
Comments
Why the double forward slash here?
|
@ktbyers I just deleted my company username from the directory. Sorry should have specified that. |
@arob182 Okay, so you edited this error line here?
And that extra space is not really in the output? Just verifying. |
@ktbyers same with
after the -W is the IP of the host put here |
Correct, I can replace with a filler if that makes parsing this easier :) |
Here is a new run of the script with it filled < host> as the IP i am trying to reach and < user> for the name.
|
This error looks like some sort of a Windows permissions error:
That is where I would search and dig some more on. I assume you have Windows Subsystem for Linux? |
@ktbyers Thanks ill dig into it some more. I do have WSL, but I am relatively new to utilizing it. I will also look into how to run the script from there. |
Yeah, that permissionError/WinError is the main thing that looked odd to me. That and this message also:
That is where I would probably start. You might want to also try to just directly use the SSH config level from WSL and openssh (i.e. test wheter it works outside of Netmiko using WSL). |
Did you manage to get a solution? |
I am receiving same error permissionError: [WinError 5] Access is denied. @arob182 did you manage to get the solution? |
@shibu503 @deveshmanish Can you try this fix? https://github.com/paramiko/paramiko/pull/1924/files And let me know if it works? |
Hi Ktbyers, Thanks for your prompt response. I have already tried the above fix to resolve same issue as mentioned in #2855. I was initially receiving below error: "ProxyCommand("ssh -F ./config -W <dev_ip_address>:22 jumphost") returned nonzero exit status: An operation was attempted on something that is not a socket" After making changes in paramiko/proxy.py as mentioned in https://github.com/paramiko/paramiko/pull/1924/files, the error was gone however getting permissionError: [WinError 5] Access is denied. Below is full error:PS C:\Users\ShibuJ\Documents\python3-venv1\p3-project> & c:/Users/ShibuJ/Documents/python3-venv1/p3-project/Scripts/python.exe c:/Users/ShibuJ/Documents/python3-venv1/p3-project/test.py
^^^^ END netmiko_send_config ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Let me know if anyother logs or output is needed. I am using nornir with netmiko for my code. Using below version:netmiko 4.1.1 Thanks |
@shibu503 Have you tried (in your SSH config file)?
Also please post your full SSH config file (after making the above change). If your SSH config file is large and has other sensitive information in it, then you should make a simplified version of the file that you can test with and share here (also just obscure anything that is confidential). |
Hi Ktbyers, Below is SSH config file:
Also from windows powershell, I can successfully login to remove device via ssh -F C:\Users\ShibuJ.ssh\config x.x.x.x. Thanks |
And same error using the above (as the previous error)? |
Hi Ktbyers, Same error, also the I am using user has administrator privileges for the windows pc. Thanks |
@shibu503 did you ever come to a conclusion on this? A year later I decided to try netmiko again but still hit the wall of I don’t think I can get this to work. |
ISSUE:
I tried following the thread, #2645, but could not reach a solution. My topology is typical.. Win10 ---> Jumpserver --> Device. When running my /.ssh/config script via powershell I can route through the proxy to end device with no issue. Even without specifying the path in powershell I route through the proxy (ex: ssh user@X.X.X.X brings me through the proxy to the switch). When I attempt to use netmiko I get thrown these errors. Below is my /.ssh/config, python script, and output. I am using Netmiko 3.4.0 and paramiko 2.8.1
Paramiko.ssh_exception.ProxyCommandFailure: ProxyCommand("ssh -F c:/users//.ssh/config -W :22 jumphost
permissionError: [WinError 5] Access is denied
/.ssh/config
script
Python Return Code
The text was updated successfully, but these errors were encountered: