1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Org-babel で リモート環境でshell scriptを実行する方法

Posted at
#+BEGIN_SRC sh :prologue "tmux attach" :dir /ssh:[servername]:~/.ssh
ls
#+END_SRC

コードブロック上でC-c C-c (org-ctrl-c-ctrl-c) すると、結果が帰ってくる。

#+RESULTS:
: authorized_keys  id_ecdsa  id_ecdsa.pub  id_rsa  id_rsa.pub  known_hosts

参考リンク

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?