Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lift limitation on ssh aliases #387

Open
dangom opened this issue May 12, 2020 · 1 comment
Open

Lift limitation on ssh aliases #387

dangom opened this issue May 12, 2020 · 1 comment

Comments

@dangom
Copy link

dangom commented May 12, 2020

"It is important to remember that remote_host must be a real host name or an IP address. SSH aliases not allowed to be used with anaconda-mode."

Why is this the case and how to make anaconda-mode work with SSH aliases?

@cartesian-theatrics
Copy link
Contributor

managed to get it working with this change:

modified   anaconda-mode.el
@@ -470,7 +470,9 @@ called when `anaconda-mode-port' will be bound."
                                       anaconda-mode-ssh-process-buffer
                                       "ssh" "-nNT"
                                       "-L" (format "%s:localhost:%s" (anaconda-mode-port) (anaconda-mode-port))
-                                      (format "%s@%s" (pythonic-remote-user) (pythonic-remote-host))
+                                      (if (pythonic-remote-user)
+                                          (format "%s@%s" (pythonic-remote-user) (pythonic-remote-host))
+                                        (pythonic-remote-host))
                                       "-p" (number-to-string (or (pythonic-remote-port) 22)))))
                ;; prevent race condition between tunnel setup and first use
                (sleep-for anaconda-mode-tunnel-setup-sleep)

Not sure how robust it is.

Note, I also had to patch pythonic-remote-ssh-p to also check for sshx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants