tramp-devel
[Top][All Lists]
Advanced

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

Re: SSH troubles


From: Michael Albinus
Subject: Re: SSH troubles
Date: Thu, 30 Jun 2022 13:22:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Frederick Bartlett <frederick.bartlett@gmail.com> writes:

> Hello!

Hi Frederick,

> Upon updating to Fedora 36, I discovered that I could not ssh into a
> site I use for work. After some investigation, I discovered that I had
> to roll back ssh to an earlier version. (Of course, I should convince
> the owner of the server to update _his_ ssh, but that’s not going to
> happen.)
>
> I now get into the server with an alias that expands to
>
> toolbox -c fedora-toolbox-32 run ssh -i ~/a.pem -o
> ServerAliveInterval=5 -o ServerAliveCountMax=1 a_user@xxx.xxx.xxx.xxx
>
> This works fine; but now I want to use Emacs to edit files on that
> server, and I’m getting the same errors that ssh gave me before my
> hack.
>
> How can I convince Tramp to use an older ssh?

You can declare your own method. Something like (untested)

--8<---------------cut here---------------start------------->8---
(add-to-list 'tramp-methods
             '("myssh"
               (tramp-login-program        "toolbox")
               (tramp-login-args           (("-c" "fedora-toolbox-32") ("run") 
("ssh")
                                            ("-i" "~/a.pem")
                                            ("-o" "ServerAliveInterval=5")
                                            ("-o" "ServerAliveCountMax=1")
                                            ("-l" "%u") ("-p" "%p")
                                            ("-e" "none") ("%h")))
               (tramp-async-args           (("-q")))
               (tramp-remote-shell         "/bin/sh")
               (tramp-remote-shell-login   ("-l"))
               (tramp-remote-shell-args    ("-c"))))
--8<---------------cut here---------------end--------------->8---

Then you can access this host in Emacs with a file name
"/myssh:a_user@xxx.xxx.xxx.xxx:/path/to/file", as usual.

> Thanks for all your work!
> Fred

Best regards, Michael.



reply via email to

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