2019.2 Using cmd.run 'ssh-agent -s' gets stuck on macOS when using runas #55300
Labels
Bug
broken, incorrect, or confusing behavior
Confirmed
Salt engineer has confirmed bug/feature - often including a MCVE
MacOS
pertains to the OS of fruit
Salt-SSH
severity-high
2nd top severity, seen by most users, causes major problems
Milestone
Description of Issue
The following command causes salt to hang on macOS:
sudo salt-call cmd.run 'ssh-agent -s' runas=some_user
I came across this while attempting to add an ssh key (copied over from the master) to ssh-agent for a specific user on the minion. My plan was to use something along these lines to accomplish that:
cmd.run 'eval ssh-agent -s; ssh-add [path to ssh key]
albeit, as part of a salt state. I'm not super familiar with the inner workings of ssh, but it seems that macOS runs different instances of ssh-agent per user, which is why I am trying to userunas
.The above command works correctly when run as root and outputs the env config needed for working with the ssh-agent.
I also tried running the above with debug output and it just gets stuck after this line:
[INFO ] Executing command 'ssh-agent -s' as user '[some_user]' in directory '/Users/[some_user]'
Setup
Steps to Reproduce Issue
Try running the above command, either directly on the minion or via a salt state.
Versions Report
Salt Version:
Salt: 2019.2.2
Dependency Versions:
cffi: Not Installed
cherrypy: Not Installed
dateutil: Not Installed
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
ioflo: Not Installed
Jinja2: 2.10.3
libgit2: Not Installed
libnacl: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 0.6.2
mysql-python: Not Installed
pycparser: Not Installed
pycrypto: 2.6.1
pycryptodome: Not Installed
pygit2: Not Installed
Python: 2.7.17 (default, Oct 24 2019, 12:57:50)
python-gnupg: Not Installed
PyYAML: 3.13
PyZMQ: 18.1.0
RAET: Not Installed
smmap: Not Installed
timelib: Not Installed
Tornado: 5.1.1
ZMQ: 4.3.2
System Versions:
dist:
locale: UTF-8
machine: x86_64
release: 17.7.0
system: Darwin
version: 10.13.6 x86_64
The text was updated successfully, but these errors were encountered: