Comments (8)
I always get :
spur.ssh.ConnectionError: Error creating SSH connection
Original error: Authentication failed.
Presumably using the username and password from the command line does work?
From my router, I see public key authentication.
Sorry, I don't understand what you mean by this.
Are you sure to set up look_for_keys to false?
If you mean the look_for_keys
argument to paramiko's connect
function, then Spur doesn't set a value i.e. it uses the default. From the error, it looks as if the credentials you're trying to use are being rejected. If you don't need to use a password, then there's no need to set it.
from spur.py.
Hello,
I tested paramiko and i'm unable to connect to my router if I don't set look_for_keys
to False.
Sorry, I don't understand what you mean by this.
My script is trying to connect to router so I can read router's log when I execute the script. Anyway, I see this:
SSH authentication method : publickey
When it works I see:
SSH authentication method : password
But if I want to see this with paramiko I have to set look_for_keys
to False...
Whatever, it's not an issue! This option is just missing.
Thank you for your quick reply:)
from spur.py.
Ah, I see. Although it's a small change, I probably won't have time to add the relevant option to spur for at least a few days. Still not entirely sure why look_for_keys
needs to be set to False
though -- I'd expect the password to be used if the private key doesn't work, but I'm not SSH expert.
Does running the equivalent ssh command on the command line work?
from spur.py.
Hello,
Yes, it weird than paramiko doens't use the password if no private key is set. I have to problem for connecting with "ssh admin@ip".
Sorry for my late reply !
from spur.py.
I have to problem for connecting with "ssh admin@ip".
So when you try using "ssh admin@ip", you're asked for a password, which the host accepts?
from spur.py.
Oops! My bad!
When i use ssh admin@ip, it works fine, I get a prompt then I enter my password and I'm connected! So I have no problem if I use command line.
from spur.py.
I've added a look_for_private_keys
argument to SshShell
, which can be set to False
, which should fix this issue. Sorry for keeping this open so long!
from spur.py.
Thank you :)
from spur.py.
Related Issues (20)
- Add ability to specify pty width/height/term
- check_call and check_output HOT 4
- get/put/read_text/read_bytes/write_text/write_bytes/mkdir HOT 10
- send_signal() only applies to parent process HOT 2
- Concrete Minimal Shell Implementation HOT 10
- Add spur to awesome-python HOT 1
- Shell.run() Errors on sudo sed command HOT 2
- Spur fails with message "no handlers could be found for logger "paramiko.transport" HOT 3
- spur fails to connect but with same configuration paramiko works HOT 3
- test failures with python 3.8 HOT 4
- spur.results.RunProcessError: return code: 127 HOT 3
- Add spur to conda-forge HOT 1
- paramiko.ssh_exception.SSHException: Channel closed.
- ~/.ssh/config is being ignored
- stderr output: b'sudo: sorry, you must have a tty to run sudo\n' HOT 1
- Unimplemented method HOT 8
- 0.3.22: test suite uses outdated `nose` HOT 1
- Support for later paramiko HOT 2
- Can't run windows commands HOT 2
- [Question] SSH keepalive
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spur.py.