emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash source code block: problem after ssh commands


From: Russell Adams
Subject: Re: bash source code block: problem after ssh commands
Date: Thu, 26 Oct 2023 16:44:51 +0200

On Wed, Oct 25, 2023 at 01:17:42PM +0200, Alain.Cochard@unistra.fr wrote:
>    #+begin_src bash :results output
>    ssh cochard@fruc.u-strasbg.fr "echo foo>foo_file"
>    echo "bar"
>    #+end_src

I know that Ihor has already reproduced, but are you using an SSH key
to connect, or entering a password?

If entering a password, I'd expect there is some mixup. That I defer
to Ihor.

If you use an SSH key for passwordless access, try adding -n (ie: "ssh
-n derp@host mycommand"). The "-n" flag helps prevent the remote
command from interfering with your local terminal by redirecting
/dev/null as the remote stdin. I have to use this commonly in systems
administration, scripts, and tools like Ansible.

Thanks.

------------------------------------------------------------------
Russell Adams                            RLAdams@AdamsInfoServ.com
                                    https://www.adamsinfoserv.com/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]