Closed stardiviner closed 5 years ago
This might also should work with other TRAMP methods like /docker:
, /su:
,
/ssh:
etc.
Have you tried executing that block without :async
? I just did, and it also hangs for me.
#+begin_src sh :dir /sudo::
pwd
#+end_src
This is in the Messages:
Tramp: Opening connection for root@<hostname-redacted> using sudo...
Tramp: Sending command ‘exec env SHELL=/bin/sh sudo -u root -s -H -p P""a""s""s""w""o""r""d"":’
Tramp: Waiting for prompts from remote shell...
Tramp: Sending Password
Tramp: Waiting for prompts from remote shell...failed
Tramp: Opening connection for root@<hostname-redacted> using sudo...failed
I just confirmed that it works with this syntax:
#+BEGIN_SRC sh :async :dir "/sudo:andrewstahlman@localhost:/"
echo $SUDO_USER $PWD
#+END_SRC
#+RESULTS:
: andrewstahlman /
And we have a unit test for this which is passing as well: https://github.com/astahlman/ob-async/blob/f52447d91dcfe08e870e2a9d1e03e0c45a7237a3/test/ob-async-test.el#L230-L242
Thanks, I see. This is solved.
Hi, I am not able to use ob-async to execute command on remote servers.
#+BEGIN_SRC sh :async :dir "/sudo:sahil@192.168.122.90:/"
echo $SUDO_USER $PWD
#+END_SRC
#+RESULTS:
: fd6e1e40ecf7ba31d30e25c2cb03b31f
It returns with error that the provided host doesn't match some regexp. Have you hard coded it to only run against localhost?
Checklist
troubleshooting.org
bufferExpected Behavior
Actual Behavior
It never returns. The process never ends.
Steps to Reproduce
Troubleshooting Artifacts