{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/24358","labels_url":"https://api.github.com/repos/saltstack/salt/issues/24358/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/24358/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/24358/events","html_url":"https://github.com/saltstack/salt/issues/24358","id":84400083,"number":24358,"title":"Netapi SSH client don't support ssh_user and ssh_passwd arguments","user":{"login":"pengyao","id":919816,"avatar_url":"https://avatars.githubusercontent.com/u/919816?v=3","gravatar_id":"","url":"https://api.github.com/users/pengyao","html_url":"https://github.com/pengyao","followers_url":"https://api.github.com/users/pengyao/followers","following_url":"https://api.github.com/users/pengyao/following{/other_user}","gists_url":"https://api.github.com/users/pengyao/gists{/gist_id}","starred_url":"https://api.github.com/users/pengyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengyao/subscriptions","organizations_url":"https://api.github.com/users/pengyao/orgs","repos_url":"https://api.github.com/users/pengyao/repos","events_url":"https://api.github.com/users/pengyao/events{/privacy}","received_events_url":"https://api.github.com/users/pengyao/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/saltstack/salt/labels/Question","name":"Question","color":"942192"},{"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-API","name":"Salt-API","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/37","html_url":"https://github.com/saltstack/salt/milestones/Blocked","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/37/labels","id":343741,"number":37,"title":"Blocked","description":"Issues which are blocked in some way, whether they need further discussion, clarification, justification, or are blocked for some other reason.","creator":{"login":"basepi","id":702318,"avatar_url":"https://avatars.githubusercontent.com/u/702318?v=3","gravatar_id":"","url":"https://api.github.com/users/basepi","html_url":"https://github.com/basepi","followers_url":"https://api.github.com/users/basepi/followers","following_url":"https://api.github.com/users/basepi/following{/other_user}","gists_url":"https://api.github.com/users/basepi/gists{/gist_id}","starred_url":"https://api.github.com/users/basepi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/basepi/subscriptions","organizations_url":"https://api.github.com/users/basepi/orgs","repos_url":"https://api.github.com/users/basepi/repos","events_url":"https://api.github.com/users/basepi/events{/privacy}","received_events_url":"https://api.github.com/users/basepi/received_events","type":"User","site_admin":false},"open_issues":236,"closed_issues":566,"state":"open","created_at":"2013-05-28T22:24:12Z","updated_at":"2015-06-03T16:28:56Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-06-03T06:58:38Z","updated_at":"2015-06-04T02:28:31Z","closed_at":null,"body":"salt-ssh should appoint username and password for ssh connection if not set ssh_user and ssh_passwd in roster.  like this:\r\n\r\n```bash\r\nsalt-ssh --user='root' --passwd='root_pass' '*' test.ping\r\n```\r\n\r\nIn Python API, we can do it like this:\r\n\r\n```python\r\nfrom salt.client.ssh.client import SSHClient\r\nclient = SSHClient()\r\nclient.cmd(tgt='*', fun='test.ping', salt_user='root', salt_passwd='root_pass')\r\n```\r\n\r\nBut in netapi, have no way to appoint the ssh_user and ssh_passwd"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/108686416","html_url":"https://github.com/saltstack/salt/issues/24358#issuecomment-108686416","issue_url":"https://api.github.com/repos/saltstack/salt/issues/24358","id":108686416,"user":{"login":"pengyao","id":919816,"avatar_url":"https://avatars.githubusercontent.com/u/919816?v=3","gravatar_id":"","url":"https://api.github.com/users/pengyao","html_url":"https://github.com/pengyao","followers_url":"https://api.github.com/users/pengyao/followers","following_url":"https://api.github.com/users/pengyao/following{/other_user}","gists_url":"https://api.github.com/users/pengyao/gists{/gist_id}","starred_url":"https://api.github.com/users/pengyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pengyao/subscriptions","organizations_url":"https://api.github.com/users/pengyao/orgs","repos_url":"https://api.github.com/users/pengyao/repos","events_url":"https://api.github.com/users/pengyao/events{/privacy}","received_events_url":"https://api.github.com/users/pengyao/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T02:28:31Z","updated_at":"2015-06-04T02:28:31Z","body":"I have try this:\r\n```\r\ncurl http://localhost:8000/run -H 'Content-Type: application/json' -d '[{\"client\": \"ssh\", \"tgt\": \"*\", \"fun\": \"test.ping\", \"ssh_user\": \"root\", \"ssh_passwd\": \"root_pass\"}]'\r\n```\r\n\r\nResult:\r\n```\r\n{\"return\": [{\"minion-01.example.com\": {\"retcode\": 255, \"stderr\": \"Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).\\r\\n\", \"stdout\": \"\"}}]}\r\n```\r\n\r\nIn https://github.com/saltstack/salt/blob/v2015.5.1/salt/client/ssh/client.py#L112:\r\n\r\n```\r\n        return self.cmd(low['tgt'],\r\n                        low['fun'],\r\n                        low.get('arg', []),\r\n                        low.get('timeout'),\r\n                        low.get('expr_form'),\r\n                        low.get('kwarg'))\r\n```\r\n**cmd_async** don't pass *salt_user* and *salt_passwd* parameter values to **cmd** function, so it isn't effect "}}