-
Notifications
You must be signed in to change notification settings - Fork 150
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
Libssh client does not attempt agent authentication #267
Comments
Thanks for the interest. SSH agent is used by default, per instructions. If you have an example where an agent has a working key but does not work can raise a bug with code to reproduce per bug template directions. Start with enabling debug log. From docs:
|
Please use discussions for questions. If there is an issue with library provide code to reproduce to be able to help further. |
I ran the setup for ssh agent and ssh add, then ran your test code and I get this output Starting new session for ubuntu@kr3.lan:22 then I go to the terminal and type ssh ubuntu@kr3.lan |
Is that all the output you get from running the above code? Can you please show output of |
OpenSSH_8.2p1 Ubuntu-4ubuntu0.1, OpenSSL 1.1.1f 31 Mar 2020 |
Your ssh command is login in with Code that is being executed and its output needs to be shown to be able to investigate. Also output of |
Sorry, I had changed the import in a vain attempt to make something work. I changed it back and added the user name and now get /home/ubuntu/miniconda3/bin/python /home/ubuntu/src/env/pssh_client.py --prompt-for-passphrase During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): Process finished with exit code 1 |
Code that is being executed needs to be shown, in full. |
I switched to using the getpass module to get the passphrase for the key upfront. I need to move on to the next item in my todo list, which is trying to get agent forwarding to work so I can do github operations with no prompts on remote servers, but it looks like this project may not support that. I have moved from ansible to the command line version of pssh, to this, and fabric. it is a weird landscape. I just want wrap my parallelized ssh calls in some code, to alleviate the disorganization I suffer when I use naked bash scripts. I will try to debug this more at the end of my workday. thank you |
If code to reproduce an issue can be shown then can investigate. Have yet to see any code, so whether there is an actual issue or not can't say. Agent authentication works, eg:
When you are able to show the code that you are running can raise a new issue.
No, agent forwarding is not currently supported. |
I dont know if this is an issue, but the discussion area seems to have no activity. I am trying to switch over to parallel-ssh because it uses python and I can stay organized better than a bunch of bash scripts, and I hate ansible.
I have pssh setup to use the public keys I copied to my remote servers using ssh-copy-id. On my dev machine I can used ssh-agent and ssh-add to make it so I can log into a remote using "ssh host1" and if the agent has a PID, I am not challenged with a password.
I am not sure how to set this up in parallel-ssh. I have tried just not entering a password in the client constructor but that gives me authentication errors. I have tried to use pkey but that gives errors too - the auth() method says FileError but no detail, and I cannot debug into the public key auth method I guess because it is wrapped C.
The text was updated successfully, but these errors were encountered: