]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
ssm: change from aws-gate to ec2-connect
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 10 Aug 2022 09:03:33 +0000 (11:03 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Wed, 10 Aug 2022 09:03:33 +0000 (11:03 +0200)
Signed-off-by: Andreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
bba.org

diff --git a/bba.org b/bba.org
index 7a2319274f71df71a7855a64e3bac8339e71ad9b..27bb8cc55b23f378ae49a486ef869d9ae99da672 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -5363,14 +5363,19 @@ define aws account or region either.
 Based on the telnet configuration (they both have similar
 capabilities) I wrote this one:
 
-  (add-to-list 'tramp-methods
-    '("ssm"
-      (tramp-login-program        "aws-gate")
-      (tramp-login-args           (("session")("%h") ("2>/dev/null")))
-      (tramp-remote-shell         "/bin/sh")
-      (tramp-remote-shell-login   ("-l"))
-      (tramp-remote-shell-args    ("-c"))))
 #+begin_src elisp :eval never :tangle no
+  (require 'tramp)
+  (eval-after-load "tramp"
+    '(progn
+       (add-to-list 'tramp-methods
+                    '("ssm"
+                      (tramp-login-program        "ec2-connect")
+                      (tramp-login-args           (("--name")("%h") ("2>/dev/null")))
+                      (tramp-remote-shell         "/bin/sh")
+                      (tramp-remote-shell-login   ("-l"))
+                      (tramp-remote-shell-args    ("-c"))))
+       (tramp-set-completion-function "ssm" tramp-completion-function-alist-ssh)))
+
 #+end_src
 
 Now we can again do strange, dark org-babel magic like: