{"action":"created","issue":{"url":"https://api.github.com/repos/saltstack/salt/issues/38016","repository_url":"https://api.github.com/repos/saltstack/salt","labels_url":"https://api.github.com/repos/saltstack/salt/issues/38016/labels{/name}","comments_url":"https://api.github.com/repos/saltstack/salt/issues/38016/comments","events_url":"https://api.github.com/repos/saltstack/salt/issues/38016/events","html_url":"https://github.com/saltstack/salt/issues/38016","id":192816988,"number":38016,"title":"salt-ssh -r '$COMMAND' - $COMMAND seems to interfere with SSH connection","user":{"login":"mirko","id":106558,"avatar_url":"https://avatars.githubusercontent.com/u/106558?v=3","gravatar_id":"","url":"https://api.github.com/users/mirko","html_url":"https://github.com/mirko","followers_url":"https://api.github.com/users/mirko/followers","following_url":"https://api.github.com/users/mirko/following{/other_user}","gists_url":"https://api.github.com/users/mirko/gists{/gist_id}","starred_url":"https://api.github.com/users/mirko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mirko/subscriptions","organizations_url":"https://api.github.com/users/mirko/orgs","repos_url":"https://api.github.com/users/mirko/repos","events_url":"https://api.github.com/users/mirko/events{/privacy}","received_events_url":"https://api.github.com/users/mirko/received_events","type":"User","site_admin":false},"labels":[{"id":41387723,"url":"https://api.github.com/repos/saltstack/salt/labels/Bug","name":"Bug","color":"e11d21","default":false},{"id":67287385,"url":"https://api.github.com/repos/saltstack/salt/labels/Core","name":"Core","color":"fef2c0","default":false},{"id":41388135,"url":"https://api.github.com/repos/saltstack/salt/labels/High%20Severity","name":"High Severity","color":"ff9143","default":false},{"id":194766324,"url":"https://api.github.com/repos/saltstack/salt/labels/P4","name":"P4","color":"031a39","default":false},{"id":67287557,"url":"https://api.github.com/repos/saltstack/salt/labels/Salt-SSH","name":"Salt-SSH","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/saltstack/salt/milestones/13","html_url":"https://github.com/saltstack/salt/milestones/Approved","labels_url":"https://api.github.com/repos/saltstack/salt/milestones/13/labels","id":9265,"number":13,"title":"Approved","description":"All issues that are ready to be worked on, both bugs and features.","creator":{"login":"thatch45","id":507599,"avatar_url":"https://avatars.githubusercontent.com/u/507599?v=3","gravatar_id":"","url":"https://api.github.com/users/thatch45","html_url":"https://github.com/thatch45","followers_url":"https://api.github.com/users/thatch45/followers","following_url":"https://api.github.com/users/thatch45/following{/other_user}","gists_url":"https://api.github.com/users/thatch45/gists{/gist_id}","starred_url":"https://api.github.com/users/thatch45/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thatch45/subscriptions","organizations_url":"https://api.github.com/users/thatch45/orgs","repos_url":"https://api.github.com/users/thatch45/repos","events_url":"https://api.github.com/users/thatch45/events{/privacy}","received_events_url":"https://api.github.com/users/thatch45/received_events","type":"User","site_admin":false},"open_issues":3249,"closed_issues":4209,"state":"open","created_at":"2011-05-14T04:00:56Z","updated_at":"2016-12-05T22:34:50Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-12-01T11:13:28Z","updated_at":"2016-12-05T22:41:14Z","closed_at":null,"body":"Passed shell command to `salt-ssh -r` seems to interfere with the SSH connection.\r\n\r\n## Setup\r\nsalt-ssh\r\n```\r\n$$HOST$$:\r\n    host: $$HOST$$\r\n    user: CONFIG\r\n    sudo: True\r\n```\r\n\r\n## Steps to Reproduce Issue\r\nI am comparing salt-ssh behaviour/output (actual) with manual ssh behaviour/output (expected).\r\n\r\n### ssh\r\n**CORRECT**:\r\n```\r\n$ ssh -l CONFIG $$HOST$$ \"sudo gpg --homedir /root/.gnupg --list-keys\"\r\n$\r\n```\r\n**CORRECT**:\r\n```\r\n$ ssh -l CONFIG $$HOST$$ \"gpg --homedir /root/.gnupg --list-keys\"\r\ngpg: fatal: can't create directory `/root/.gnupg': Permission denied\r\nsecmem usage: 0/0 bytes in 0/0 blocks of pool 0/65536\r\n$\r\n```\r\n### salt-ssh\r\n**CORRECT**:\r\n```\r\n$ salt-ssh '$$HOST$$' -r \"sudo gpg --homedir /root/.gnupg --list-keys\"\r\n$$HOST$$:\r\n    ----------\r\n    retcode:\r\n        0\r\n    stderr:\r\n    stdout:\r\n$\r\n```\r\n**_INCORRECT_**:\r\n```\r\n$ salt-ssh '$$HOST$$' -r \"gpg --homedir /root/.gnupg --list-keys\"\r\nPermission denied for host $$HOST$$, do you want to deploy the salt-ssh key? (password required):\r\n[Y/n]\r\n^C\r\n```\r\n\r\nTo ensure a missing key or other ssh-salt-related config is not the issue but only happens with above gpg-call:\r\n```\r\n$ salt-ssh '$$HOST$$' -r \"id ; sudo id ; ARBITRARY_NONEXISTING_COMMAND ; sudo ARBITRARY_NONEXISTING_COMMAND ; gpg --version ; sudo gpg --version\"\r\n$$HOST$$:\r\n    ----------\r\n    retcode:\r\n        0\r\n    stderr:\r\n        sh: 1: ARBITRARY_NONEXISTING_COMMAND: not found\r\n        sudo: ARBITRARY_NONEXISTING_COMMAND: command not found\r\n    stdout:\r\n        uid=501(CONFIG) gid=501(CONFIG) groups=501(CONFIG),27(sudo)\r\n        uid=0(root) gid=0(root) groups=0(root)\r\n        gpg (GnuPG) 1.4.18\r\n        Copyright (C) 2014 Free Software Foundation, Inc.\r\n        License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\n        This is free software: you are free to change and redistribute it.\r\n        There is NO WARRANTY, to the extent permitted by law.\r\n        \r\n        Home: ~/.gnupg\r\n        Supported algorithms:\r\n        Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA\r\n        Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\r\n                CAMELLIA128, CAMELLIA192, CAMELLIA256\r\n        Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\r\n        Compression: Uncompressed, ZIP, ZLIB, BZIP2\r\n        gpg (GnuPG) 1.4.18\r\n        Copyright (C) 2014 Free Software Foundation, Inc.\r\n        License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\r\n        This is free software: you are free to change and redistribute it.\r\n        There is NO WARRANTY, to the extent permitted by law.\r\n        \r\n        Home: ~/.gnupg\r\n        Supported algorithms:\r\n        Pubkey: RSA, RSA-E, RSA-S, ELG-E, DSA\r\n        Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,\r\n                CAMELLIA128, CAMELLIA192, CAMELLIA256\r\n        Hash: MD5, SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224\r\n        Compression: Uncompressed, ZIP, ZLIB, BZIP2\r\n$\r\n```\r\n\r\n## Versions Report\r\n```\r\n$ salt-ssh --version\r\nsalt-ssh 2016.3.3 (Boron)\r\n```"},"comment":{"url":"https://api.github.com/repos/saltstack/salt/issues/comments/265001582","html_url":"https://github.com/saltstack/salt/issues/38016#issuecomment-265001582","issue_url":"https://api.github.com/repos/saltstack/salt/issues/38016","id":265001582,"user":{"login":"Ch3LL","id":6886822,"avatar_url":"https://avatars.githubusercontent.com/u/6886822?v=3","gravatar_id":"","url":"https://api.github.com/users/Ch3LL","html_url":"https://github.com/Ch3LL","followers_url":"https://api.github.com/users/Ch3LL/followers","following_url":"https://api.github.com/users/Ch3LL/following{/other_user}","gists_url":"https://api.github.com/users/Ch3LL/gists{/gist_id}","starred_url":"https://api.github.com/users/Ch3LL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ch3LL/subscriptions","organizations_url":"https://api.github.com/users/Ch3LL/orgs","repos_url":"https://api.github.com/users/Ch3LL/repos","events_url":"https://api.github.com/users/Ch3LL/events{/privacy}","received_events_url":"https://api.github.com/users/Ch3LL/received_events","type":"User","site_admin":false},"created_at":"2016-12-05T22:41:14Z","updated_at":"2016-12-05T22:41:14Z","body":"Yes sorry authorized_keys! Wow that was totally my fault. Thanks for clarifying that, just wanted to triple check you weren't using a password. That is what I did in my test case as well so I wanted to make sure you auth was setup the same way. Thanks"}}
{"actor":{"display_login":"Ch3LL"}}