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
Netapi SSH client don't support ssh_user and ssh_passwd arguments #24358
Comments
I think this should be transparently passed through. What syntax have you tried so far? You can try this (example is in JSON so set the content-type header in your request to [{"tgt": "*", "salt_password": "pass", "salt_user": "root", "fun": "test.ping", "client": "cloud"}] |
I have try this:
Result:
In https://github.com/saltstack/salt/blob/v2015.5.1/salt/client/ssh/client.py#L112:
cmd_async don't pass salt_user and salt_passwd parameter values to cmd function, so it isn't effect |
Great catch! Thanks for pointing that out. |
@pengyao quick fix in the above pull req. I won't have time to test this before tomorrow or so. If you're able to test it before then please let us know how it goes. |
@whiteinge It don't work, because salt_user and salt_passwd arguments in low , not kwargs |
Doh. Right you are. Thanks for submitting a fix! |
I try this:
result:
version report
|
In 2014.1.4 version I can specify the target machine execute commands, the target machine not written in the roster file
But in 2015.5.3 version failed result:
So.....In 2015.5.3 version,the target machine must be written in a roster file? |
Interesting, I didn't know that it ever worked to just use the IP address of the host without specifying a roster. I think 2015.5 requires a roster file, but it should also be fairly straightforward to allow raw ip addresses in the command without a roster file. Would you please open a new issue? |
issue #26689 |
salt-ssh should appoint username and password for ssh connection if not set ssh_user and ssh_passwd in roster. like this:
In Python API, we can do it like this:
But in netapi, have no way to appoint the ssh_user and ssh_passwd
The text was updated successfully, but these errors were encountered: