Skip to main content
18 votes

Magit, how to use system's ssh agent and don't ask for password

Another solution for the lazy is to just use a package that handles exactly this case (setting Emacs' keychain-related environment variables): Install and add to your init.el package keychain-...
tlegutko's user avatar
  • 356
16 votes
Accepted

Use sudo while editing over SSH?

Using TRAMP multi-hops. For instance, if you want to edit the remote file /root/salary.txt /ssh:homer@powerplant|sudo:powerplant:/root/salary.txt The example is taken from the Mastering Emacs book.
Manuel Uberti's user avatar
15 votes

fix or workaround: "Terminal is not fully functional"

Quick answer That's not an issue, it's a statement of fact. M-x shell isn't a fully functional terminal - it simply can't do what you want it to do. If you want a full terminal emulator in emacs, you ...
Tyler's user avatar
  • 22.8k
13 votes

Magit asks for passphrase for ssh key every time

Running ssh-agent and hoping for the best is not enough. ssh-agent hands out the decrypted private key to everyone asking on a specific socket. The problem is that the socket is not always the same ...
tarsius's user avatar
  • 26.3k
11 votes

Tramp unable to open some files

I had a similar problem when trying to open/save plain ASCII files via tramp's sftp: the files were fine, I was able to edit them with, for example,nano, but trying to open them via tramp would get ...
fr_andres's user avatar
  • 211
7 votes

TRAMP is unbearably slow (OSX, ssh)

I know it's an old question and that you maybe don't care about the answer now but I do faced the same issue. I was pretty sure it was OS X related but in fact lags and timeouts were caused by my ...
Bounga's user avatar
  • 91
6 votes

fix or workaround: "Terminal is not fully functional"

If you don't care about whether Emacs is a "fully-functional" terminal or not and you just want it to work without making you press enter, then run the psql command \pset pager off. This ...
db48x's user avatar
  • 19.1k
6 votes

Can Emacs use tramp to run in an interactive session on a remote HPC node?

I have been struggling to do the same. I found a different route that allowed me to do basically the same thing. You can open a shell buffer by M-x shell and from there connect to the login node, and ...
Joonha Park's user avatar
6 votes
Accepted

Magit doesn't recognise git repo through ssh connection

Error (magit): Magit requires Git >= 1.9.4, you are using 1.8.3. I've already installed git 2.10.0 on /usr/local/git The list of directories to search for executables on remote hosts is ...
tarsius's user avatar
  • 26.3k
6 votes

Emacs 26.1 RC1 display issues over SSH/X11 with xming/vcxsrv

Emacs 26 by default switches on double buffering for X servers when it finds the Xdbe header on the build machine. (See Emacs 26 release notes at the GitHub mirror.) Some X servers don’t support this. ...
halloleo's user avatar
  • 1,385
6 votes
Accepted

Emacs find-file over SSH is too slow to connect

Indeed, Tramp doesn't like your fancy prompt. The Tramp manual explains what to do, the FAQ section. In short, you shall add to your remote .profile [[ $TERM == "dumb" ]] &&...
Michael Albinus's user avatar
5 votes

Magit how to use ssh key rather than being prompted for password

The issue was that the remote url was set to https rather than ssh following these steps fixed the issue https://help.github.com/articles/changing-a-remote-s-url/
irregular's user avatar
  • 1,032
5 votes

Magit how to use ssh key rather than being prompted for password

Edit ~/.ssh/config so that it contains the following: Host github.com IdentitiesOnly yes IdentityFile ~/.ssh/your_ssh_key Then whenever magit asks git to ask ssh to talk to github.com, ssh will ...
db48x's user avatar
  • 19.1k
5 votes
Accepted

tramp-default-method has no effect

With Tramp 2.3 / Emacs 26.1, Tramp's syntax has changed. It requires now the method name mandatory. If you want the shorter version of Tramp file names (without the method), you must change the syntax ...
Michael Albinus's user avatar
5 votes
Accepted

How to make TRAMP aware of VPNs?

The answer to any engineering question that starts with “Can I have…” is almost always yes. The real question is how much work it will take, and whether it is worth it. You haven’t said what operating ...
db48x's user avatar
  • 19.1k
5 votes

Tramp mode - Copying files

You can use dired-async-do-copy from emacs-async to Run ‘dired-do-copy’ asynchronously.
Tianshu Wang's user avatar
  • 1,829
4 votes

TRAMP vs ssh to remote emacs

A third variant is to mount the remote directories via sshfs and access them via your local Emacs. This has the advantage that you don't have to reproduce your Emacs setup on the remote machine(s) ...
loris's user avatar
  • 315
4 votes

Can't connect to remote ssh host using tramp on Windows

Try sshx command instead of ssh when opening with C-x C-f For more, search sshx at https://www.gnu.org/software/tramp/
Paul's user avatar
  • 191
4 votes
Accepted

How can Magit add a credential to ssh-agent?

You can use the ssh-agency package for this. It integrates with magit, and will run ssh-add as needed when you push. If you don't have ssh-askpass installed, you will need a version which includes ...
npostavs's user avatar
  • 9,253
4 votes
Accepted

Copy/paste between SSH terminal Emacs and macOS

I just recently wrote an Emacs package called Clipetty which solves this very problem. It uses OSC-52 xterm escape sequences, is smart enough to know when you're running on a remote host, and can deal ...
spud's user avatar
  • 121
4 votes
Accepted

emacs daemon and ssh agent forwarding

Both return the same value when getenv is called on SSH_AUTH_SOCK from within an emacs client. That looks unlikely. One would return ~/.ssh/ssh_auth_sock and the other would return /path/to/HOME/....
phils's user avatar
  • 53k
4 votes
Accepted

TRAMP mode hangs while copy large file from remote to local via Ssh

TRAMP uses itself Base64 encoding, it doesn't hangs, just takes a really long time for larger files. Maybe rsync or rcp methods speeds up the process, but this is its basis. What may be done is run ...
Borba88's user avatar
  • 156
4 votes
Accepted

Magit connecting to github with alternate ssh key

There's a pure Git solution you can use in your global .gitconfig - I use an include.path config for personal stuff by default: # .gitconfig # default user email and key [include] path = ....
jidicula's user avatar
  • 253
4 votes

how to execute sudo su --login username command with TRAMP

The variable tramp-methods keeps the arguments which Tramp uses for different methods. For sudo, there is the entry `("sudo" (tramp-login-program "env") (tramp-login-...
Michael Albinus's user avatar
3 votes

Use sudo while editing over SSH?

I wrote a command for automating @Manuel Uberti's answer. The second one is the one I'd use. It uses the first one for remote files and uses crux for local files. (require 'crux) (require 's) (defun ...
Hatshepsut's user avatar
3 votes
Accepted

connect to remote emacs session via ssh

Since this is running on X, it might be possible to use a program like xdotool , xdo, or wmctrl All these programs allow you to list windows, select one, and simulate typing on them. Another ...
icarus's user avatar
  • 1,934
3 votes

edit via tramp/ssh fails on Solaris host

First of all, it would be helpful to see Tramp traces with tramp-verbose set to 6. I don't know whether this is a bug, or something related to Solaris 10 and the shell you are using there. For this I ...
Michael Albinus's user avatar
3 votes

Magit, how to use system's ssh agent and don't ask for password

FWIW, keychain now has a --systemd switch, which will inject the variables into the systemd user environment. The simplest solution I found was to add eval "$(keychain --eval --quiet --noask --...
Vladimir Panteleev's user avatar
3 votes
Accepted

Querying remote postgres from org

You might can try TRAMP multi-hops, Like open the org file on db-lv-host, it has the SQL babel, then use TRAMP multi-hops to open it, then execute it. It might will executed on db-lv-host. I have not ...
stardiviner's user avatar
  • 1,958
3 votes

Tramp connection fails with "timeout reached"

This is an issue mentioned in the Emacs Wiki: If you have Control-j mapped in your ~/.inputrc ... it can cause tramp to never finish recognizing the shell prompt. For me, the problem went away ...
Davor Cubranic's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible